• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 824
  • Last Modified:

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..


 
0
Tol_cv
Asked:
Tol_cv
1 Solution
 
ramazanyichCommented:
You can try to manipulate with parameters:
worker.maintain
socket_timeout
connection_pool_timeout
in workers.properties.

check http://tomcat.apache.org/connectors-doc/config/workers.html for details
0
 
sleep_furiouslyCommented:
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

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now