Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 23, 2012, 10:34:08 PM

Pages: [1]   Go Down
  Print  
Author Topic: MySQL timeout  (Read 2926 times)
SkillAdvance
Spaceship Navigator
*****
Offline Offline

Posts: 82


WWW
« on: July 07, 2010, 03:15:21 PM »

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.

Thanls

Jeremy
Logged

JR
_______________________________________________________

SkillAdvance LLC
 Web:     http://www.skilladvance.com
_______________________________________________________
Pages: [1]   Go Up
  Print  
 
Jump to: