• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why i always get outofmemory expection ?

 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i using xp pro 2nd edition .. how to set memory of tomcat ? thanks for your reply , ben
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic