• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

jForum Database Connection Pool - auto restart after timeout closure

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am using jforum with Tomcat 5.1 on MacOsX.
My problem is that after 1 hour of inactivity, the connection pool shuts the connections OFF (which is great).
The issue is that the connections are automatically RE-ENABLED right after being closed, even if there is NO activity (access) to the forum.

Here is an example:
1-connections are closed
2-connections are reopened right away

=> how can we keep the connections CLOSED and re-open them only if there is an access to the forum app?

Thanks.
Philippe.


---------------------------------
07:11:21,530 INFO [PooledConnection ] Real closing connection...
07:11:21,531 INFO [PooledConnection ] Real closing connection...
07:11:21,531 INFO [PooledConnection ] Real closing connection...
07:11:21,531 INFO [PooledConnection ] Real closing connection...
07:11:21,532 INFO [PooledConnection ] Real closing connection...
07:11:21,532 INFO [PooledConnection ]
*********************************************
07:11:21,532 INFO [PooledConnection ] ******** STARTING CONNECTION
POOL ***********
07:11:21,532 INFO [PooledConnection ]
*********************************************
07:11:21,532 INFO [PooledConnection ] database.connection.driver =
com.mysql.jdbc.Driver
07:11:21,532 INFO [PooledConnection ] minConnections = 5
07:11:21,532 INFO [PooledConnection ] maxConnections = 10
07:11:21,533 INFO [PooledConnection ] timeout = 5000
07:11:21,533 INFO [PooledConnection ]
*********************************************
07:11:21,586 INFO [PooledConnection ] Fri Apr 29 07:11:21 CDT 2005
opening connection 1
07:11:21,599 INFO [PooledConnection ] Fri Apr 29 07:11:21 CDT 2005
opening connection 2
07:11:21,638 INFO [PooledConnection ] Fri Apr 29 07:11:21 CDT 2005
opening connection 3
07:11:21,666 INFO [PooledConnection ] Fri Apr 29 07:11:21 CDT 2005
opening connection 4
07:11:21,677 INFO [PooledConnection ] Fri Apr 29 07:11:21 CDT 2005
opening connection 5


[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the problem: if you use the JFORUM connection pool, there is a thread that reinitialize the connections every [database.ping.delay] milliseconds.
This property is set in jforum-custom.conf and in SystemGlobals.properties.

Note: there is no way to disable this feature. So I set it to a very high number.

Bye
Philippe.
[originally posted on jforum.net by Anonymous]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic