-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maciej Bobrowski wrote:
> Hi, > > We have a java server connected to mysql v. 4.1.0. It connects and remains > connected (it should). Some people work on it from about 7 a.m till about > 3 p.m. In the morning when we come to work, we can see the link failure. > It seems like after some hours (?) the mysql server disconnect any client > if he was still connected and didn't do anything. Is there any variable > which could define something like timeout or I should add something to the > my.cnf? > In previous mysql releases we didn't have such a problem.. > > Regards, > Maciej Bobrowski > Hi! Please read http://www.mysql.com/documentation/connector-j/index.html#id2802490 (the 'Troubleshooting' section of the manual, which is also included in the README that comes with the JDBC driver). It is not good practice to rely on database connections to 'stay connected' when developing multi-tier systems. The JDBC spec provides no guarantees for a connection to remain 'valid' and 'connected.'. Your code needs to have mechanisms for handling communications errors with the database (that's why exceptions were invented, and Sun made sure to specify that SQLExceptions have a lot of information in them via getSQLState() and getVendorErrorCode() so that your code can determine what is an appropriate action to take). Regards, -Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 557 2388 www.mysql.com Are you MySQL Certified? http://www.mysql.com/certification/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/MmaXtvXNTca6JD8RAoiaAJ94MNT+9TT4pLWY0cYDhilGh1tFRwCeP0e8 w6AIIqUvzngVVFUPZYqkVCg= =Zgzi -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]