Alex R
Alex R

Reputation: 11893

How to configure Tomcat connection pool for low-volume applications?

This application spends most of its time idle, with no requests.

With the default settings, the connection to the database times out after several hours. Then the first request that comes in throws an exception.

What settings do I need to change to ensure this doesn't happen?

Upvotes: 0

Views: 46

Answers (1)

Usman Mutawakil
Usman Mutawakil

Reputation: 5259

Here's an answer I posted a while back on the various connection pool configurations you can use based on load. The example is for mysql but it applies to all connection pool types. For you just go to the section labeled Low Traffic. A sample config file is listed below it.

tomcat 7.0.42 pooling, hibernate 4.2, mysql rock solid autoreconnect solution

Upvotes: 1

Related Questions