You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Garthfield Carter <ga...@webconexion.net> on 2005/02/08 00:13:21 UTC

Stopping infinite loops

I run a server with Tomcat 5.0.27. A user managed to bring the server to
a grinding halt for 6 hours after he created a servlet with an infinite
loop, the piece of code that contained the infinite loop had a MySQL
connect statement which added to the problem greatly.

I've searched extensively for various answers in how to limit the damage
of infinite loops in Java but have drawn blanks. The memory allocated to
the JVMs is set to a maximum of 24MB per account. 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
wouldn't die depending on what time limit I set. You can't specify child
process ulimits unfortunately.

I'm hoping there's some admin settings perhaps I can use with Tomcat
itself or in the JVM.

Garthfield


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org