tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garthfield Carter <>
Subject Limit infinite loop damage
Date Wed, 09 Feb 2005 16:46:24 GMT
Sorry I posted this earlier but it joined the wrong thread.

I'm using Tomcat 5.0.27 with Sun SDK 1.4.2. A user managed to bring the
whole server to a grinding halt for 6 hours after he created a Servlet
which had an infinite loop. The piece of code that contained the
infinite loop had a MySQL connect statement which added to the problem

I've searched extensively for various answers in how to limit the
damage of infinite loops in Java but have found nothing. The memory
allocated to the JVM is set to a maximum of 24MB. This had little
effect in keeping the damage down. Any pointers would be greatly
appreciated. I've toyed with the idea of using ulimit on CPU time but
then Tomcat would die depending on what time limit I set and not the
Servlet thread. You can't specify a child process ulimit unfortunately.

I'm hoping there's some admin settings perhaps I can use with Tomcat
itself or in the JVM to automatically kill a rogue Servlet.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message