On 26/10/2010 00:05, Hannaoui, Mo wrote: > Hi, > > > > We are using mod_jk version 1.2.28, Apache 2.2.15 on Red Hat 4.1.2-46. > The Apache server is 4-core CPU. The AJP is load balancing 2 Windows > JBoss_4_2_2_GA / Tomcat-5.5 servers with 4-core CPU and 8GB RAM each. > > > > We are having couple problems with the AJP connector. Before I explain > the problem, I want to say that I have been measuring it by the number > of http connections (ps -ef|grep http|wc -l). I am able to correlate the > increase in errors and eventually the refusal of connections to the > number of http connections. > > > > 1. When there are > 30 http connections, I see the error below almost > every 1 minute. As the traffic and the number of connections increase, > the frequency of error increases and the performance of the web > application that is being hosted on the system decreases. > > > > [Mon Oct 25 20:59:42 2010][11224:3086337808] [info] > ajp_process_callback::jk_ajp_common.c (1882): Writing to client aborted > or client network problems > > [Mon Oct 25 20:59:42 2010][11224:3086337808] [info] > ajp_service::jk_ajp_common.c (2540): (worker2) sending request to tomcat > failed (unrecoverable), because of client write error (attempt=1) > > [Mon Oct 25 20:59:42 2010][11224:3086337808] [info] > service::jk_lb_worker.c (1388): service failed, worker worker2 is in > local error state > > [Mon Oct 25 20:59:42 2010][11224:3086337808] [info] > service::jk_lb_worker.c (1407): unrecoverable error 200, request failed. > Client failed in the middle of request, we can't recover to another > instance. > > > > > > [Mon Oct 25 22:13:26 2010][27236:3086337808] [info] > ajp_process_callback::jk_ajp_common.c (1882): Writing to client aborted > or client network problems > > [Mon Oct 25 22:13:26 2010][27236:3086337808] [info] > ajp_service::jk_ajp_common.c (2540): (worker1) sending request to tomcat > failed (unrecoverable), because of client write error (attempt=1) > > [Mon Oct 25 22:13:26 2010][27236:3086337808] [info] > service::jk_lb_worker.c (1388): service failed, worker worker1 is in > local error state > > [Mon Oct 25 22:13:26 2010][27236:3086337808] [info] > service::jk_lb_worker.c (1407): unrecoverable error 200, request failed. > Client failed in the middle of request, we can't recover to another > instance. > > [Mon Oct 25 22:13:26 2010][27236:3086337808] [info] jk_handler::mod_jk.c > (2611): Aborting connection for worker=loadbl > > > > > > > > 2. The number of connections will suddenly surge from say 40 to 90 to > ~200 in no time, at which point all I see in mod_jk.log is error > messages and the application either stops responding with the connection > refused or bad gateway error. To fix the problem the Jboss service > usually needs to be restated. This surge is unpredictable and may happen > between 1 and 5 times in 24 hours. > > > > I have read many posts and documents (including > http://kbase.redhat.com/faq/docs/DOC-15866 and used > http://lbconfig.appspot.com/ for base configurations) and changed the > configurations many times, but the problem continues to exist. I think > my current configuration is the worst version so far. It works well only > with low traffic. > > > > Here's the current configuration: > > > > --- workers.properties ---- > > worker.list=loadbl,status > > worker.template.port=8009 > > worker.template.type=ajp13 > > worker.template.lbfactor=1 > > worker.template.ping_mode=A > > worker.template.reply_timeout=30000 > worker.template.socket_connect_timeout=10000 > worker.template.socket_timeout=10 > worker.template.connection_pool_timeout=600
I can't get to the jk docs docs at the moment, but that socket_timeout seems a little low. Are those the defaults? p > worker.worker1.reference=worker.template > > worker.worker1.host=jboss_server1 > > worker.worker2.reference=worker.template > > worker.worker2.host=jboss_server2 > > worker.loadbl.type=lb > > worker.loadbl.balance_workers=worker1,worker2 > > worker.loadbl.sticky_session=True > > worker.status.type=status > > ----------------------------------- > > > > ---- http.conf ---- > > <IfModule mpm_prefork_module> > > StartServers 8 > > MinSpareServers 5 > > MaxSpareServers 20 > > MaxClients 250 > > MaxRequestsPerChild 0 > > </IfModule> > > ---------------------- > > > > > > ----- server.xml ---- > > <Engine name="jboss.web" defaultHost="localhost" jvmRoute="worker1"> > > .... > > .... > > <!-- Define an AJP 1.3 Connector on port 8009 --> > > <Connector port="8009" address="${jboss.bind.address}" > protocol="AJP/1.3" > > emptySessionPath="true" enableLookups="false" > redirectPort="8443" > > maxThreads="800" connectionTimeout="600000"/> > > > > ---------------------- > > > > > > Any help in figuring this out is very much appreciated. Are there any errors in the app server logs, which might indicate that there's a problem with the application?
0x62590808.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature