tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pablo BarrĂ³n" <>
Subject Internal Tomcat4/jk2/apache2 timeout after lengthy servlet processing?
Date Fri, 22 Jun 2007 11:45:46 GMT

I've run into a configuration problem in a Tomcat4/jk2/Apache2 server
(Debian Sarge 3.1), in which Java servlets are running to generate the
webpages. There are some operations that need quite a lot of time of
processing without user interaction (like, sending a newsletter to thousands
of addresses, or uploading a huge zip and processing photographs inside),
and I noticed that after such operations, the server would not send the
result webpage to the client browser, even though there is no problem at the
java level; all operations conclude succesfully.

I made a test java class, which just waited for some time and generated a
webpage in the end. So, I could verify that when these internal operations
last more than 5 minutes, the browser gets no answer. If less time is used
internally by the servlet to execute, the webpage is sent without any
problems. Now even though the browser would not receive anything, operations
were completed succesfully. I could read my debug printing in the log4j
logs, and as well sending the newsletters or uncompressing zip files were
successful operations.

My idea then is that the problem might belong to the Apache and Tomcat
intercommunication, or be a Tomcat timeout to Apache2 (?). If it was a
client-server timeout, I guess then the browser should have alerted me, but
Firefox (and IE for that matter) just looked as if it was waiting for
something. Meanwhile, the tomcat classes logs would tell me that the
operations were finished, as in normal operation.

The closest I've seen to the more or less 5 minutes timeout I saw was the
"Timeout" field in apache2.conf, which was 360 seconds. I've tried putting
that to a high number. I've tried as well to put a huge timeout into the
IfModule directives; prefork, etc. (Well I think the problem is in the
Apache2 - Tomcat4 communication but I've tried almost any parameter I could
find, just in case)

I've tried as well to modify the file (for which the
documentation is not really clear and some pages in jakarta give 404's, but
I'm afraid I have to stick with jk2), like this:

info=Global server options

and like this:

info=Ajp13 forwarding over socket

I've modified as well /etc/tomcat4/server.xml; I've put "0" -and -1 to test-
in the "connectionTimeout" value in the 8009 port AJP 1.3 Connector, and
"disableUploadTimeout" to "true". I've done the same to 8180's Coyote
HTTP/1.1 Connector. No results, so I'm really out of imagination, and I've
been unable to find any more suggestions in the available documentation.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message