tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renato Weiner <>
Subject Re: Killing endless loop servlet - howto ? killing JVM or unload class ?
Date Thu, 12 Jul 2001 13:08:26 GMT

Actually I'm testing some time-out features of Tomcat. Users eventually ended up doing endless
loops ( like, forgetting to move to next line in a database record set... ). So, what I'm
trying to see if there is a patch that could kill the 'offending' threads after a defined
time interval.
  Dmitri Colebatch <> wrote: Does it intentionally loop forever? If so,
creating a new thread and having 
that do the work (hence returning tomcat's thread to the server) should do 
the trick.


On Sat, 30 Jun 2001 07:28, you wrote:
> Hi all,
> I'm rolling out a successful Tomcat instalation in a shared environment (
> it's a great software ! ). But I have a concern. I created a servlet that
> loops forever ( a very stupid one, by the way ). When I executed it, it
> allocates a Tomcat thread and it just runs forever. If I try to kill it
> after it consumed, let's say, 30 seconds of processing, it ended up killing
> the whole JVM. First, I don't know if it's killing a thread is the right
> approach. Should I do that, without shutdown Tomcat ? Is there a way to set
> a 'time-out' for a Servlet ? What I can do in this situation ? Is there an
> Interceptor that can unload this class somehow ? Thanks in advance
> Renato - Brazil
> P.S. I'm running Linux, kernel 2.4.3, Tomcat 3.2.2
> ---------------------------------
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35 a year!

Content-Type: text/html; charset="us-ascii"; name="Attachment: 1"
Content-Transfer-Encoding: 7bit

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year!
View raw message