Frederik Nosi wrote:
First thanks for your reply,
On 03/27/2014 10:32 AM, Mark Thomas wrote:
On 27/03/2014 01:39, Frederik Nosi wrote:
Hi all,
Having to deal with slow applications deployed under tomcat, with a
reverse proxy in front, frequently i've noticed that even when the
frontend timeouts and closes it's part of the TCP connection, the Tomcat
thread processing the request goes on and on till it finishes. Is there
a way to make the proccessing thread stop when the frontend connection
get's closed?
No.
Any hints on how to deal with situations like this?
This is basically an issue similar to the one that is the subject of the other message
thread "Re: Is it possible to send a 'keep-alive' packet back to client session every x
seconds?".
AFAIK, the only portable way to detect this situation, is by forcing the web application
to regularly send some output to the client. If the connection has been closed, it will
then (*) get an exception, which it can handle.
It implies that the webapp itself is not blocked waiting on some separate resource, and
can regularly break out of its own main processing to send such output, resuming its main
work if the result is ok.
(*) with possibly some delay before everything gets flushed all the way to the client
connection, and the disconnected state makes its way back up the chain.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org