cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL timeout

abirhasan
Master User

I am working on a simple application using JSP/Servlet and MySQL and I am using the Gefion connection pooling class available from http://webdevelopersjournal.com/columns/DBConnectionManager.java.  I keep getting timeouts with messages similar to this:


com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
  at sun.reflect.GeneratedConstructorAccessor103.newInstance(Unknown Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  at java.lang.reflect.Constructor.newInstance


The same code works fine on my development system.  I have read posts about increasing the timeout for connections held in a pool, to avoid this issue.

Since this is a low volume application, connection pooling is probably overkill but I like to do a job properly.  Surely I'll consume more LP resources by opening and closing connections each time they are needed, rather than opening and sharing through a pool.

Either way, it doesn't matter to me but would appreciate an 'official' verdict from LunarPages.

Thanks

0 REPLIES 0