christophe blin wrote:
> 
> 
> Pid-2 wrote:
>> Can you elaborate on the reason behind this requirement?
>>
> 
> sure !
> 
> first some background :
> 1/ my servlet is a web service (done with spring exporter and xfire if that
> matters)
> 2/ the client is not a browser but the PHP SOAP extension
> 3/ 5 seconds is the example (in real life, it would be something like 30
> seconds)
> 
> my problem : when the php script times out (max_execution_time of the
> php.ini is reached), the servlet request does not stop...
> As a consequence, I found 5 threads in my tomcat instances which take 100%
> of the CPU and with a lifetime greater than or equals to 123000532ms (that
> make more than 1 day).

You should have a closer look to see what those threads are actually
doing, before you start altering your timeouts.  If it's something in
the servlet that's causing it, then forcing the request to timeout may
not be the answer.

Try taking a thread dump of one of the long-lasting ones and follow the
stack trace to see where it's stuck.

I'm pretty certain you don't want to kill the main thread itself.

p



> so I'd like to know how to stop a request if it takes more than x seconds
> (like the php.ini max_execution_time).
> 
> I know this is surely bad practice but I can not find a way to sort out this
> problem otherwise
> 
> note : sometimes when the php script times out the request is closed, but
> sometimes not... so maybe this is a PHP issue or a PHP Soap extension issue


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to