Dear Rainer,

Thanks for explanation. In this particular case, when client press a button on 
JSP, it initiates a Database search operation, which may take time up to 30-45 
seconds. Meanwhile, we are showing a screen which tell user that his / her 
request is being processed and no to close the window. 

But, sometimes users are impatient and still close the window. Yes, as you 
suggested, it is possible to handle close event / stop processing by some 
notification, but application is full of such utilities, and it is too much of 
efforts.

I am interested in some parameterization, which detects broken connection and 
automatically drops stuck request. I have even checked this with requests with 
STAGE as KEEPALIVE, but not working with STAGE as SERVICE. Also, I am not able 
to figure out, why the processing is repeated.

With best regards,
Nishant Hadole
Mailto: nishant.had...@siemens.com
-----Original Message-----
From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
Sent: Friday, 04 December, 2009 03:14 PM
To: Tomcat Users List
Cc: Hadole, Nishant IN BOM SISL
Subject: Re: Tomcat Crashes out of continuous servicing of stuck request

On 04.12.2009 10:29, Hadole, Nishant IN BOM SISL wrote:
> I am using Apache HTTP Server 2.0.61, Apache Tomcat Server 6.0.14.0 and 
> mod_jk 2.0.46 (AJP V 1.3).

mod_jk 2.0.46 does not exist.

> Scenario - Client call for heavy Post request from JSP. Tomcat receives the 
> request and starts processing. Before receiving the response, client closes 
> JSP window. Thus there is no one to receive the output.
>
> Issue - Tomcat continues processing request indefinitely, causing loss of 
> free heap memory and eventually crashes. When checked in Tomcat Monitor, 
> under header jk-8009, the stage for stuck request is SERVICE and time goes on 
> increasing.
>
> I have checked several Time-outs setting for tomcat and AJP connectors, but 
> still of no use.

Without trying to send something back to the client, there is no way 
telling the client closed the window (or pressed reload or switched to 
another URL). So in order to be able to stop processing long running 
stuff, you need to try sending something to the client every now and 
then, and your code working on producing the real response content needs 
to be stopped by some notification. You will need to implement this 
yourself.

Maybe someone can provide some example code?

> Kindly help. Also let me know if any specific parameterization is to ne 
> mentioned here for this.
>
>
> Note: We cannot avoid client closing window while request processing is in 
> progress.
>
> With best regards,
> Nishant Hadole
> Tel.: +91 22 2495 7816
> Fax: +91 22 6660 8521
> Mailto: nishant.had...@siemens.com

Regards,

Rainer

Reply via email to