Have you counted the actual # of requests for both apaches via something
like server-status, or looked in mod_jk.log, that they are both
receiving an equal # of successful requests?
The "Writing to client aborted or client network problems" are nothing
to really worry about. They usually mean the browser/client has closed
the connection (clicked Stop or clicked Back) before the request was
done being processed/sent.

-Tony
---------------------------
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
abia...@formatdynamics.com
http://www.formatdynamics.com


-----Original Message-----
From: Ian Long [mailto:ian.l...@opterus.com] 
Sent: Thursday, March 05, 2009 10:57 AM
To: users@tomcat.apache.org
Subject: Tomcat and Apache with mod_jk

Hi,

I have dedicated RHEL5 boxes (dedicate quad core, 4GB RAM) setup with  
both apache httpd and tomcat running on the same box, with a hardware  
load balancer selecting the node a user is routed to.  I have mod_jk  
setup, but am seeing some behaviour I'm not sure is correct.  This is  
on httpd 2.2.3, tomcat 6.0.16, and mod_lk version of 1.2.26.  The load  
balancer pings the machines every 2 seconds as part of a health check.


Below are the relevant bits of my configuration:

mod_jk.conf
==========
LoadModule      jk_module modules/mod_jk.so
JkLogFile       /var/log/httpd/mod_jk.log
JkLogLevel      info
JkWorkersFile   /etc/httpd/conf.d/workers.properties
JkShmFile       /var/log/httpd/jk.shm
JkShmSize       800
JkOptions       +ForwardURICompatUnparsed
JkMount         /* ajp13
JkUnMount       /cacti/* ajp13
JkUnMount       /manager/* ajp13

workers.properties
==============
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.maintain=60
worker.ajp13.type=ajp13
# worker.ajp13.connection_pool_minsize=0
worker.ajp13.connection_pool_timeout=600
worker.ajp13.connect_timeout=10000
worker.ajp13.prepost_timeout=10000
worker.ajp13.max_packet_size=16384

httpd.conf
========
<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      800
MaxClients       800
MaxRequestsPerChild  0
</IfModule>

server.xml
========
     <Connector port="8009" connectionTimeout="600000"  
minSpareThreads="5" packetSize="16384" address="127.0.0.1"
                enableLookups="false" disableUploadTimeout="true"  
maxSpareThreads="75" maxThreads="800" protocol="AJP/1.3" />

On one machine, after 5 or 6 hours, when I run netstat to look at  
connections between http and tomcat, I have 250 or so:

tcp        0      0 ::ffff:127.0.0.1:8009       ::ffff: 
127.0.0.1:60408      ESTABLISHED

whereas the other machine only has 40 or so, and they are equally load  
balanced.  I tried setting worker.ajp13.connection_pool_minsize=0 but  
this has no effect on what I'm seeing.

Is this the behaviour I should expect?  The load on the machine is not  
that heavy, at the busiest period there would be 3 request per second  
going to the box.

I wouldn't expect this number to keep growing, especially under light  
load.

I'm also seeing a few errors like the following in mod_jk.log:

[Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info]  
ajp_process_callback::jk_ajp_common.c (1603): Writing to client  
aborted or client network problems
[Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info]  
ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat  
failed (unrecoverable), because of client write error (attempt=1)
[Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info]  
jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13
[Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info]  
ajp_process_callback::jk_ajp_common.c (1603): Writing to client  
aborted or client network problems
[Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info]  
ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat  
failed (unrecoverable), because of client write error (attempt=1)
[Thu Mar 05 10:34:28.528 2009] [26222:3086382864] [info]  
jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13
[Thu Mar 05 10:36:01.071 2009] [25855:3086382864] [info]  
ajp_process_callback::jk_ajp_common.c (1603): Writing to client  
aborted or client network problems
[Thu Mar 05 10:36:01.072 2009] [25855:3086382864] [info]  
ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat  
failed (unrecoverable), because of client write error (attempt=1)
[Thu Mar 05 10:36:01.072 2009] [25855:3086382864] [info]  
jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13
[Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info]  
ajp_process_callback::jk_ajp_common.c (1603): Writing to client  
aborted or client network problems
[Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info]  
ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat  
failed (unrecoverable), because of client write error (attempt=1)
[Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info]  
jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13
[Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info]  
ajp_process_callback::jk_ajp_common.c (1603): Writing to client  
aborted or client network problems
[Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info]  
ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat  
failed (unrecoverable), because of client write error (attempt=1)
[Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info]  
jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13
[Thu Mar 05 12:08:17.432 2009] [28428:3086382864] [info]  
ajp_process_callback::jk_ajp_common.c (1603): Writing to client  
aborted or client network problems
[Thu Mar 05 12:08:17.432 2009] [28428:3086382864] [info]  
ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat  
failed (unrecoverable), because of client write error (attempt=1)
[Thu Mar 05 12:08:17.433 2009] [28428:3086382864] [info]  
jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13
[Thu Mar 05 12:12:19.656 2009] [28363:3086382864] [info]  
ajp_process_callback::jk_ajp_common.c (1603): Writing to client  
aborted or client network problems
[Thu Mar 05 12:12:19.656 2009] [28363:3086382864] [info]  
ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat  
failed (unrecoverable), because of client write error (attempt=1)
[Thu Mar 05 12:12:19.657 2009] [28363:3086382864] [info]  
jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13

Can anyone see anything wrong with the configuration?

Cheers,
Ian Long
Chief Software Architect, Opterus Inc.

Email: ian.l...@opterus.com
Phone: 416-840-8495 x666
Mobile: 416-817-9206
Web: http://www.opterus.com






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to