[opencms-dev] firewall closes connections to DB

Achim Westermann achim.westermann at gmx.de
Wed Jan 27 00:00:49 CET 2010


Hi Jordi,

you could give it a try by using eviction in the commons dbpc 
configuration. Look at your opencms.properties under 
<appserver>/webapps/<opencmswebappname>/WEB-INF/config/.

There are the following settings:

<snip>

# connections will be validated by evictor thread
db.pool.default.testWhileIdle=true

# number of milliseconds to sleep between runs of the evictor thread
# -1 means no idle connection evictor thread will be run
db.pool.default.timeBetweenEvictionRuns=3600000

# number of connections tested in a run of the evictor thread
db.pool.default.numTestsPerEvictionRun=3

# minimum amount of time in milliseconds a connection may be idle in the 
pool before it is eligable for eviction
db.pool.default.minEvictableIdleTime=1800000

# the query to validate connections
#db.pool.default.testQuery=SELECT STRUCTURE_ID FROM 
CMS_OFFLINE_STRUCTURE WHERE RESOURCE_PATH = '/'
db.pool.default.testQuery=

# number of attempts to connect to the database during startup (default 
= 10)
db.pool.default.connects=10

# sleep time between two attempts to connect to the database during 
startup in ms (default = 5000)
db.pool.default.wait=5000
</snip>

by default.

Comment in the db.pool.default.testQuery. That should be used for 
validating if a connection is still alive.

In theory the evictor thread will throw away the broken pipe connection 
from the pool. You could decrease the time between eviction runs.

HTH,

Achim



Jordi Martí wrote:
> Hi all,
> 
> if anyone could help with this, i would be very very very thankful.
> 
> We have a stable opencms 6.0.3 version (sigh) running on production for 
> around two-three years. It has been used for internal purposes 
> (intranet); but now, we want to use it as an extranet; but we installed 
> it in a DMZ and now, connections are being closed by the firewall, 
> causing after long periods of inactivity, a white screen during about 15 
> minutes until the system closes or throws the old connection away.
> 
> I've searched it in nabble and found these two links that advise me to 
> do a wget in a cron. That's a dirty *but useful* solution that I will 
> implement.
> http://old.nabble.com/MySQL,-OpenCms-and-a-3Com-Superstack-firewall-to883637.html#a883637 
> 
> http://old.nabble.com/OpenCms-Freezing-to2173684.html#a2175298
> (BTW, system managers keep on telling me that it is not possible to 
> deactivate this "feature" in the firewall)
> 
> *My question is:*
> Is there ANY feature / bugfix after opencms 6.0.3 that would REALLY fix 
> my problem and I could use it as an argument to migrate to opencms 7.5?
> 
> I cannot do any test on production and i have not been able to reproduce 
> the problem at localhost, so I cannot figure it out by myself.
> 
> Thanks everybody.
> 
> Jordi Martí - jmarti xATx theinit _DOT_ com
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list