wood burning stoves*
The moose likes Tomcat and the fly likes why i always get outofmemory expection ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "why i always get outofmemory expection ?" Watch "why i always get outofmemory expection ?" New topic
Author

why i always get outofmemory expection ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 439
hi, i using tomcat 5.5 , after few reload in tomcat, it always give me outofmeory exception error , should i need to set something to handle this problem ? thank you !
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Either your app has a memory leak or you're just not allocating enough memory for Tomcat. By default the JVM runs with 64 megs.

Which OS are you using?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 439
i using xp pro 2nd edition .. how to set memory of tomcat ? thanks for your reply , ben
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you downloaded and installed the ".exe" version of tomcat and you chose to install the "start menu items", you can configure the memory by clicking Start -> All Programs -> Apache Tomcat -> Configure Tomcat -> Java (tab), and filling out the "Intial Memory Pool" and "Maximum Memory Pool" fields.

If your app does have a memory leak, increasing the JVM heap size will only postpone the inevitable. Most memory leaks in a Java Web App are the result of connections not being returned to a connection pool.
[ June 23, 2005: Message edited by: Ben Souther ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
Alternately, if you are executing startup.bat from a command prompt (which calls catalina.bat) you can set the JAVA_OPTS environment variable in the catalina.bat file with any of the Java command line options. (See the SDK tooldocs for the available options)
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why i always get outofmemory expection ?