You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Richard Evans <rd...@webtrak.co.uk> on 2000/09/09 22:58:29 UTC

Thread worries

We've been running into problems with WebSphere on loaded sites and I'm
worried that the same problems may exist in tomcat.

What happens is you get error 500s when a servlet is called a lot of times;
looking at backtraces shows that exceptions are being thrown when formatting
dates (for response headers presumably).  This is because SimpleDateFormat
is _NOT_ thread safe (see bug 4228335 on the javasoft bug parade); here's
part of a backtrace:

 at java.text.SimpleDateFormat.format(Compiled Code)
 at java.text.DateFormat.format(Compiled Code)
 at sun.servlet.http.HttpDate.toString(Compiled Code)
 at sun.servlet.http.MimeHeaderField.getValue(Compiled Code)
 at sun.servlet.http.MimeHeaders.getHeader(Compiled Code)

Now Tomcat has MimeHeaders and MimeHeaderField classes, perhaps derived from
Sun's.

Is it possible that tomcat could suffer from the same problems on a loaded
site, or was this problem known about and a fix put in?

Richard