You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dimitar Georgievski <mi...@gmail.com> on 2011/10/18 20:39:39 UTC
[users@httpd] Reuse mod_ajp_proxy connections
Hello,
We have a Tomcat 5.5.25 server connected to Apache 2.2.9 over mod_ajp_proxy.
Monitoring of the servers shows that AJP proxy connections are not reused
but closed and reopened. Frequent closing of TCP connections leaves many
connections in TIME_WAIT state and this is something we would prefer to
avoid if possible.
While reviewing of Apache, Tomcat and mod_proxy settings I found that the
response from Tomcat contains a flag that indicates if the TCP connection
should be reused after the end of a request-handling cycle.
http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html#resppacketstruct (See
Response packet structure)
My understanding of the *reuse* flag in AJP13_END_RESPONSE structure is that
this flag is hard coded and cannot be controlled by configuration settings.
Am i right? I couldn't find any in Tomcat AJP connector configuration that
could do change the value of this setting.
The ProxyPassMatch directive is using all the default settings for the proxy
connection
ProxyPassMatch ^/(.*) ajp://localhost:8009/$1
Apache is configured to use mpm workers. The following are Apache compile
settings:
# bin/apachectl -V
Server version: Apache/2.2.9 (Unix)
Server built: Jun 21 2008 18:48:38
Server's Module Magic Number: 20051115:15
Server loaded: APR 1.3.2, APR-Util 1.3.2
Compiled using: APR 1.3.2, APR-Util 1.3.2
Architecture: 64-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/local0/tmp/new_build/obj/x86_64-linux-glibc2/apache2.2"
-D SUEXEC_BIN="/usr/local/covalent/apache2.2/bin/suexec"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpsd.conf"
Thanks,
Dimitar