mod_jk socket_timeout elaboration
Using mod_jk 1.2.28 on Apache 2.2.3 (please redirect me if there is a better list for mod_jk issues) I am encountering socket timeouts, I believe, but I need help understanding what's actually happening. As a test, I have a simple jsp that does a sleep(6000) (10 seconds), so when I hit this test url on a setup with no other traffic (where the servers are on the same fast network), I can reproduce the problem every time. When I comment out the sleep, I get no error. Mon May 10 10:31:01.119 2010] [15471:3086317328] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1150): (appserver1) can't receive the response header message from tomcat, network problems or tomcat (10.0.1.108:8009) is down (errno=11) [Mon May 10 10:31:01.119 2010] [15471:3086317328] [error] ajp_get_reply::jk_ajp_common.c (1962): (appserver1) Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon May 10 10:31:01.119 2010] [15471:3086317328] [info] ajp_service::jk_ajp_common.c (2447): (appserver1) sending request to tomcat failed (recoverable), (attempt=1) This happens with socket_timeout set to 10. I can make this all go away by setting socket_timeout to something really high, or 0, but I'd like to understand what's happening. socket_timeout is supposed to be in seconds, but I get these error messages logged at around 1 second. I have to increase socket_timeout to above 30 or so for it to work, but I still get the error back faster than I can really measure. worker properties: worker.worker_template.port=8009 worker.worker_template.type=ajp13 worker.worker_template.lbfactor=1 worker.worker_template.ping_timeout=1000 worker.worker_template.ping_mode=A worker.worker_template.socket_timeout=10 worker.worker_template.connection_pool_timeout=600 Thanks, Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: mod_jk socket_timeout elaboration
From: Bob Jewell [mailto:jewe...@franklin.edu] Subject: mod_jk socket_timeout elaboration I have a simple jsp that does a sleep(6000) (10 seconds) That looks like 6 seconds to me... This happens with socket_timeout set to 10. To can quote previous responses from Rainer: Don't use socket_timeout. Use version 1.2.28 and socket_connect_timeout. http://marc.info/?l=tomcat-userm=125897176719328w=2 More information: http://marc.info/?l=tomcat-userm=125675257720614w=2 And more detail: socket_timeout is a difficult beast and I generally do not recommend using it. mod_jk uses it in some special situations in order to be able to abort waiting for data. It is not directly 'how long a socket will be kept open'. How long a socket is kept open depends on how the socket gets used. Usually you can get away pretty good using CPing and ping_timeout, socket_connect_timeout, eventually reply_timeout with max_reply_timeouts. http://marc.info/?l=tomcat-userm=125663788907668w=2 - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: mod_jk socket_timeout elaboration
- Charles R Caldarale chuck.caldar...@unisys.com wrote: From: Bob Jewell [mailto:jewe...@franklin.edu] Subject: mod_jk socket_timeout elaboration I have a simple jsp that does a sleep(6000) (10 seconds) That looks like 6 seconds to me... Er, good call. not going to explain my embarrassingly potent math skills today. This happens with socket_timeout set to 10. To can quote previous responses from Rainer: Don't use socket_timeout. Use version 1.2.28 and socket_connect_timeout. http://marc.info/?l=tomcat-userm=125897176719328w=2 More information: http://marc.info/?l=tomcat-userm=125675257720614w=2 And more detail: socket_timeout is a difficult beast and I generally do not recommend using it. mod_jk uses it in some special situations in order to be able to abort waiting for data. It is not directly 'how long a socket will be kept open'. How long a socket is kept open depends on how the socket gets used. Usually you can get away pretty good using CPing and ping_timeout, socket_connect_timeout, eventually reply_timeout with max_reply_timeouts. http://marc.info/?l=tomcat-userm=125663788907668w=2 - Chuck Thanks for the info. And apologies for making you link me instead of finding it through searches, but I was apparently searching for the wrong things. We'll run these suggestions through some tests and hopefully I won't have more questions. -bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org