Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

Tomcat getting out-of-memory errors

Hi,

I am getting intermittent out-of-memory errors on Tomcat.  The server is Windows 2003 with 2 Gig of memory.  We do share the server with an MS-SQL Server but there are only 16 or so people using it, hardly concurrently either.  We check all our database connections are getting closed.  I am not sure what to look for or where to look.  If it is a matter of expanding the Tomcat memory, can you please advise on how to do that?

Thanks
0
James Cochrane
Asked:
James Cochrane
1 Solution
 
rama_krishna580Commented:
Hi,

1) I suspected this to be the JSP compiler, however, it turns out to be part of the Hotspot engine. This component running out of memory is only a symptom, not the cause of the problem. It probably is your code causing the problem.

ad 2) Sorry, I misinterpreted this to be the JSP compiler. It is the hotspot engine. Go to http://forums.itrc.hp.com/cm/1,,,00.html and select "search". Type in "CompileThread0" and you will get pointers to two articles hinting at a possible bug in the JVM/Hotspot engine and/or missing patches. As one of the messages is dated February, you may actually find a patch correcting this if it is a JVM bug.

ad 3) That's a random effect.

ad 4) As I mentioned, we have also found funny effects with Tomcat 3. Try to upgrade to Tomcat 4 and see if the problem persists. Chances are, the more recent Xerces and Tomcat libraries work more reliable.

ad 5) You can quickly define a LoggingStream which basically forwards all method calls to an underlying Stream object, but also logs data being sent back and forth. This is a rather trivial exercise, so I am not including code here.

If you have a chance to try your code on a Solaris or Linux system, try it. My suspicion is that your code will run just fine under these operating systems with Tomcat 4.

I am afraid, this is all I can offer to help... good luck!!!

R.K
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now