This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Java.lang.out of memory exception:Pergem space error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Java.lang.out of memory exception:Pergem space error" Watch "Java.lang.out of memory exception:Pergem space error" New topic

Java.lang.out of memory exception:Pergem space error

priscilla kurian

Joined: Aug 07, 2012
Posts: 11
I am working with tomcat 7.0.25 and ubuntu.while I am trying to start my application pergem space erro occure in log file.How can I remove this pergem space error in ubuntu-tomcat.Where to ser JAVA_OPTS in
or catalina.bat?how can I set JAVA_OPTS.Please help me.It is an urgent one.Thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16473

The default PermGen space is 128M, and while not many things use PermGen, Tomcat eats a lot of it, so it's common to run out when re-deploying webapps, or deploying apps such as JPA-based apps that also consume PermGen.

You should be able to ease the pain by creating a file named "" (or setenv.bat, for Windows) in the TOMCAT_HOME/bin directory. Put this line into it:

You can adjust the Xms and Xmx if you like - I pulled this from a major server which uses more RAM than average.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Java.lang.out of memory exception:Pergem space error