?
Solved

java.lang Out of memory

Posted on 2006-11-07
3
Medium Priority
?
256 Views
Last Modified: 2008-01-09
I have a jsp based web application running on Tomcat 5.0.28 on a windows 2000 server.  There are about 140 users of the web application.

At least once a day a java.lang Out of memory message is displayed instead of the jsps being served.  The only way we have found to rectify this problem is to restart the tomcat service.

Any ideas on how to stop this happening ?
0
Comment
Question by:Sean_Devlin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
rowdy_h earned 1000 total points
ID: 17893125
Possibly you have a memory leak that is eating up the memory. If so you probably want to find a profiling tool that will help you. I can't advise on what to try as we use the Tivoli tools with Websphere.

Another possibility is that the JVM heapsize is too small for your application. We had this initially with a new webapp at work. I don't know tomcat myself so maybe someone else can tell you to find out what heapsize it's using. The default for websphere that we use was 256Mb or 512Mb (I can't remember which). As we have a server with several gig of memory we could easily increase this. If you know where the settings are in tomcat then try experimenting with increasing the values. However, remember you need to leave memory free for the operating system and anything else you're running on the box. Try watching the box's memory use while the application is running to work out how much free the box has that the app could use.

If tomcat allows you to set command line arguments for the JVM then the relevant switches are -Xms (for minimum heap size) and -Xmx (for maximum heap size).

If the above don't help and your application is caching data from a database you may need to adjust the amount being cached down to leave memory free. It will slow down your app, but hopefully it'll stop it falling over.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question