3 Replies Latest reply on Feb 10, 2009 5:23 PM by Richard Taylor

    How set request timeout?

    Alexander Bunkenburg Newbie

      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.