Link to home
Start Free TrialLog in
Avatar of Tol_cv
Tol_cv

asked on

Apache - tomcat -jk close idle connections

Hi,
 I have  a site configured with apache and tomcat (mod_jk).
Apache and tc are on diffrent servers.
 The  problem is that in case of network problems  (apache host and tc host don't communicate anymore) ,  apache  proceses  reach max childs and apache need restart. even if apache  doesn't reach maxChilds, tomcat became unavailable in 2-3 hours  - it reaches its maximum processes value.

this is  big problem because the site  has a very high load - even 30 sec -1 min not communication time is a problem.
 I would like to configure the worker to close the connection if idle  for a period, but this  should not afftect the performance, or the actiive jk connections..


 
ASKER CERTIFIED SOLUTION
Avatar of ramazanyich
ramazanyich
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sleep_furiously
sleep_furiously

There are several features for controlling the life cycle of socket connections for AJP 13.

For the case of connection problems, probably the most useful for you will be connect_timeout and prepost_timeout.  These set the number of milliseconds the server will wait for a PONG response to a PING request:

  worker.<workername>.connect_timeout = 500
  worker.<workername>.prepost_timeout = 500

There are other timeouts that can be set for the cache/connnection pool.  A lot of these are changing with JK version 1.2.16.  More details can be found here:

http://tomcat.apache.org/connectors-doc/config/workers.html