Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OutOfMemory in Servlet

 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks, i have this outofmemory error problem.
my servlet works with the data stored in a file which updates and grows. when the file becomes bigger than 4M the servlet checking it throws the error.
i've found that this might happen because of the jvm memory problems and the right way to deal with it is to use %JAVA_HOME%\bin\java -Xms64m file.class ...
the question is how can i run this on the server, where i don't have any class file with main method. thank's in advance.
 
Praveen Kumar Jha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to look at the script which starts jvm for servlet engine. In that script you should pass -Xmx option with appropriate maximum heap size. you may want to set same heap size for -Xms as well.
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank's praveen, any ideas in what file exactly do i have to put it (tomcat 4.0)?
 
Praveen Kumar Jha
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
probably it is ${TOMCAT_HOME}/bin/startup.sh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic