Michal- We're in exactly the same situation (running 4.1.x), and our solution is to isolate the most critical application(s) in their own jvm (and tomcat instance). Because everything is running as a single process, it's difficult to get very fine-grained control over an app's resource use beyond that.
I imagine there are steps one could take to add some kind of instrumentation on threads, etc., but I'd also have to imagine that being an extremely heavyweight solution. If you come up with a better way of doing things, please post. Regarding your security manager comment: You shouldn't need to write a custom security manager- you probably just need to customize your policy file. You can isolate webapps by code base or signature (if they're deployed from a war file), so you're really just limited by your tolerance for keeping the policy file up-to-date. The only customization of the manager I ever needed to do was to write a kind of "open" manager that logged missing permissions instead of throwing exceptions: This was to do development without having to resort to the AllPermission "solution" that folks tend to suggest when AccessControlExceptions start popping up. Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -----Original Message----- From: Michal Kwiatek [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 9:21 AM To: Tomcat Users List Subject: RE: Multihosting in tomcat To add another point to my earlier post: I'm not concerned with malicious code like "System.exit(1)" because a custom SecurityManager will take care of that. What worries me is the abuse of resources causing the server to go low on resources and crash. Perhaps installing a separate Tomcat instance for every application is a solution? Cheers, Michal. -----Original Message----- From: Michal Kwiatek Sent: Tuesday, May 11, 2004 9:42 AM To: [EMAIL PROTECTED] Subject: Multihosting in tomcat Hello all! I have to set up a multihosting service based on tomcat. What I mean by multihosting is that many people are able to deploy their web application on the server. The problem is that the applications can be badly written (for instance can contain unfinite loops) and thus cause the server to go down on resources and crash. I need a solution for: (1) identifing applications consuming to much resources, (1) killing them. I know that it is possible to programatically stop a web application deployed on Tomcat. But will it work if Tomcat gets low on resources? And how will I know which application to stop in the first place? Needless to say, it has to be done automatically. Thanks very much, Michal. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
