• 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
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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]
 
We don't have time for this. We've gotta save the moon! Or check this out:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic