Re: Communications link failure due to underlying exception...various network exceptions
Posted by: John Degner
Date: May 24, 2007 05:12PM

I just solved this problem after 4 hours of debugging and fighting configs.

I'm not sure if this will work for everybody, but it was the root of my problem and was definitely a beast to find.

I am running JBoss 4 with MySQL 5.

The problem was that the MySQL wait_timeout setting had been changed. We used to run that setting at 600 (don't ask me why...seems quite large). In JBoss we have files: <MODULE_NAME>-mysql-ds.xml. This file has an entry: <idle-timeout-minutes>. The minimum here is 1 and can only be bumped up in increments of 1 minute (we use a setting of 1 minute). Since our MySQL wait_timeout setting had changed from 600 seconds -> 15 seconds this error was being thrown by JBoss. I can only think that JBoss holds connections and expects them to be active when it does it's checks and if they're not, it calls it a PING TIMEOUT (confusing language >:-| ).

To resolve, check what your application server expects the database timeout to be and try to match them up closely, but err on the side of larger timeouts on the database. I set my app server to 1 minute and MySQL to 75 seconds (to change temporarily in MySQL):
mysql> set global wait_timeout=75;
mysql> select @@global.wait_timeout;

Hope this is the cause for somebody's problem too!

Options: ReplyQuote


Subject
Written By
Posted
Re: Communications link failure due to underlying exception...various network exceptions
May 24, 2007 05:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.