1

Is it possible to get this error on tomcat server in other way then redeploy wars or edit jsp files? We got this error on server where theoretically we don't do redeploys. Do you know best solution to monitor PermGen from linux console?

Toma
  • 380
  • 3
  • 17

4 Answers4

1

permGen means Permanent generation, this is the place where all your constant are stored like strings (in most cases before java 7) were stored on this permgen, One way to get rid of it is you simply increase the memory using

-XX:PermSize=512m

This is what I did, but from your scenario it feels like there is some kind of memory leak, I am not sure how to detect it, there are frameworks available for this and netbeans also provides application profiling support.

Here are some good links http://www.eclipse.org/tptp/home/documents/tutorials/profilingtool/profilingexample_32.html

http://www.ej-technologies.com/products/jprofiler/overview.html

https://netbeans.org/kb/docs/java/profiler-intro.html

Bilbo Baggins
  • 2,899
  • 10
  • 52
  • 77
0

It doesn't have to be because of redeployments or more over a file edits. It is more likely that your Java apps on the server are using up all allocated memory. So yes, it is possible to get this error on tomcat server in other way then redeploy wars or edit jsp files.

When it comes to monitoring you might be interested in this API: http://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryMXBean.html

Or try looking for a monitoring software by typing tomcat monitor permgen in Google - lots of results are being returned.

FazoM
  • 4,777
  • 6
  • 43
  • 61
  • Yes, but our application was running 7 days and after this 7 days we got this error. What is interesting 'top' command shows 32GB total memory, including: 5GB free and 12GB cached. When you said "Java apps on the server are using up all allocated memory" you thought about java memory settings or about memory on server where application is running? – Toma Nov 29 '13 at 12:01
  • It clearly means that your Java app used all the space allocated. It is very typical error. Take a look here: http://stackoverflow.com/questions/1880687/how-to-simulate-the-out-of-memory-requested-array-size-exceeds-vm-limit and here http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error?rq=1 – FazoM Nov 29 '13 at 12:03
0

There is a tool for remote monitoring of VM: http://visualvm.java.net/

Vitalii Pro
  • 313
  • 2
  • 17
0

I remember the default permgen on Tomcat being pretty low, if you have a decent sized application with a lot of third party dependencies this can cause loads of classes to reside in pergmen. You could legitimately need more pergmen space, try increasing it.

NickDK
  • 5,159
  • 2
  • 18
  • 11