This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c3p0 configuration need help!

 
Fedry Kemilau
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I have a doubt in setting the c3p0 configuration. I'm using hibernate framework for the ORM and MySQL for the database server. The variable wait_timeout is set to default which is 28800.

After implementing the connection pool, I managed to fix the problem, but not perfectly. Sometimes, socket exception is still thrown by tomcat, so user should refresh the page again to get the actual result.

So, I hope someone can help me with a better configuration for the c3p0.

Here is a cut of my configuration file:



Thank you,
Fedry
 
Emanuel Kadziela
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Socket exceptions rarely have anything to do with your connection pool configuration. If you were running out of connections or were taking too slow to get more connections or your startup was slow, or ... then maybe the pool configuration would be to blame, but socket exceptions usually mean your database is actually not physically reachable (as in the cable got disconnected) or something of that sort. It may also have nothing to do with the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic