[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - How set request timeout?
bunkenburg
do-not-reply at jboss.com
Mon Jan 21 12:40:14 EST 2008
Hello people
I am wondering how to set the request timeout for servlets in Apache+mod_jk+JBoss4.2.2.
We are using Apache (prefork) 2.2 with mod_jk 1.2.25 on RedHat5, with JBoss 4.2.2. Sometimes our servlets take a long time in replying. I would like to configure a timeout. If a servlet takes too long, I would like a new entry in some error log and I would like the browser to receive a nice error page. Is it somehow possible to make the JBoss thread that is executing the long request stop or interrupt it?
I have looked in the Apache 2.2 configuration, where I found TimeOut which limits the socket between the browser and Apache --- not what we want.
I have looked in the doc for mod_jk where I found reply_timeout. I set it to 25 seconds, and that at least closes the connection to the browser. The browser receives nothing, that is a blank page. But the thread in JBoss is still working, and I cannot find how to log this timeout. Our system admins will have no idea theses timeouts are happening. If we had a servlet with an infinite loop, more and more JBoss would be lost executing the infinite loop.
I have looked in the JBoss-Tomcat doc where I cannot find how to configure a request timeout.
How can a configure a request timeout, ideally with some logging and an error page?
Many thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121909#4121909
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121909
More information about the jboss-user
mailing list