You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Samuel Cheung <SC...@Novarra.com> on 2002/08/14 21:25:14 UTC

Run away servlet in Tomcat

Hi,

How does Tomcat handle a run away servlet? (I mean tomcat gets a request, it
call a servlet to handle it,  that servlet stuck in an infinite loop)

Can tomcat still handle new requests to same/other servlet?  Can we config
tomcat to kill certain request if it does not finish execution within a time
period?

Thank you.
Sam

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Run away servlet in Tomcat

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 14 Aug 2002, Samuel Cheung wrote:

> Date: Wed, 14 Aug 2002 14:25:14 -0500
> From: Samuel Cheung <SC...@Novarra.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: 'Tomcat Users List' <to...@jakarta.apache.org>
> Subject: Run away servlet in Tomcat
>
> Hi,
>
> How does Tomcat handle a run away servlet? (I mean tomcat gets a request, it
> call a servlet to handle it,  that servlet stuck in an infinite loop)
>

Tomcat doesn't deal with this situation.

> Can tomcat still handle new requests to same/other servlet?

Sure, although ultimately the competition for CPU time is going to have
adverse effects on response time.

>  Can we config
> tomcat to kill certain request if it does not finish execution within a time
> period?

You'll have to arrange for that yourself, by starting a background
"watchdog timer" thread or something.  Tomcat doesn't have anything like
that -- it assumes that you've programmed your servlets correctly.

>
> Thank you.
> Sam

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>