----- Original Message -----

> From: "Caldarale, Charles R" <chuck.caldar...@unisys.com>
> To: Tomcat Users List <users@tomcat.apache.org>
> Cc: 
> Sent: Friday, August 5, 2011 9:38 AM
> Subject: RE: Urgent: Tomcat 6.0.20 on Solaris 10 Reaches max threads and is 
> non responsive
> 
> From: Mark Thomas [mailto:ma...@apache.org] 
> Subject: Re: Urgent: Tomcat 6.0.20 on Solaris 10 Reaches max threads and is 
> non 
> responsive
> 
>>  Now, is this a fixable thing within the Java stack? Or is it an
>>  application limitation?
> 
> The other option is re-write the STM Servlet(s) as non-STM.
> 
> What Mark didn't say is that, in this day and age, using the single-thread 
> model is really rather dumb.  It can be used to work around sloppy 
> programming 
> techniques, but shouldn't appear in any proper modern application.  To quote 
> from the servlet spec:
> 
> "It is recommended that a developer take other means to resolve those 
> issues instead of implementing this interface, such as avoiding the usage of 
> an 
> instance variable or synchronizing the block of the code accessing those 
> resources. The SingleThreadModel Interface is deprecated in this version of 
> the 
> specification."
> 
> (The above has been in the spec for many years.)
> 
> - Chuck


Yep, everything I've read states that STM servlets are evil. In fact one of the 
books I have has (evil) after SingleThreadModel in the index.

A real problem that I mentioned in another mail message is the following 
scenario.

1. ValidateServlet has a bug
2. This bug prevents ValidateServlet from completing

Now all someone has to do in order to prevent further connections to 
ValidateServlet is to create the appropriate request that tickles the bug and 
launch it 20 times against the web site.

If ValidateServlet is a central part of the site (sounds like it's a general 
validation utility), then the site is essentially down after 20 well-crafted 
requests.

Load balancing, increasing the number of STM threads allowed in Tomcat, etc. 
will just delay the onset of this problem.

This servlet and the underlying logic needs to be rewritten.

. . . . just my two cents.
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to