Thanks for the thoughts which I'll pass on to the coder.  My role is
deployment and the thing that gets me is that this exact code has been
working for years on various varieties of Unix without problem and for more
for six months on NT4.  What is in Win2000 which could make a difference.

However I may be making some progress in that I did get something similar
from a different stable to run last night, which gives me a chance to narrow
down the problem area.  I just wish I knew why the change of operating
system could be having such an effect!

Cheers  Jon

-----Original Message-----
From: Joel Kozlow [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 17:49
To: '[EMAIL PROTECTED]'
Subject: RE: Tomcat Servlets bringing down Win2000 Server

Hmm... your problem really sounds code specific, not like a Tomcat issue.
As a matter of fact, I have Win2K servers with IIS5 and Tomcat 3.2.1 running
servlets that produce XML also.  Some of my servlets return thousands of
nodes as well.  All of them run just fine.

In order to help you, we really need to know exactly at what point your code
gets hung.  For example, does your servlet crash while writing to the
outputStream?  If so, what are you writing, and how much data is already
committed?  Is your servlet throwing any exceptions that might be trapped
and inadvertently silenced?  Thus, you need to provide more information.

However, here are a few suggestions that might help you with your debugging
effort:

* Don't forget to call response.setContentType("text/html");

* As soon as you call "response.setContentType("text/html");", you have
committed your output stream.  This is a point of confusion for a lot of
people.  Thus, don't call this function until you are ready to write other
output.

* Since you are only writing text, try using a PrintWriter instead of just
an outputStream.

* Be sure to Flush the outputStream regularly

* If you are not using an XML parser to write your output, don't forget to
escape the XML tags.  For example '&' needs to be escaped to "&", and
other characters such as '<', '>', "\"", etc need to be escaped as well.

I hope this helps,

- Joel

-----Original Message-----
From: Jon Gibbs-Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 8:00 AM
To: Tomcat-User
Subject: Tomcat Servlets bringing down Win2000 Server


Sorry sent in html earlier -

We have been running a system of Servlets for some years on both Unix and
NT4 platforms.  I recently installed Tomcat 3.2.1 on a Win2000 server
running IIS5.  All appeared fine both on port 8080 and using the
isapi_redirect and reading/writing to the sql 2000 database.

BUT  servlets producing xml cause the server to go into freefall. CPU usage
goes off the scale for about 5 minutes and on several occasions it has died
completely.

I have tried Sun JRE 1.2.2 and IBM JRE 1.3  both with similar results.

Any ideas / similar experiences anyone

Thanks

Jon GS


Reply via email to