0

Environment: Windows Server 2003 x86 Intel Xeon 2.3 4gb Ram | tomcat 7.0.27 | jdk 1.7.0.25

I am facing the OutOfMemoryError. SO suggests using java options to increase the permgen space using following options

-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC

However tomcat status page still shows the permgen memory as 64MB. Why cant it pick up the value specified in the parameters?

orak
  • 2,399
  • 7
  • 29
  • 55

2 Answers2

0

There is no PermGen in the status page, see this http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Introduction.

Anyways you conf seems OK

Since PermGen is a java thing (not tomcat) you should use java tools to check it, take a look at this.

Community
  • 1
  • 1
luiso1979
  • 868
  • 1
  • 6
  • 18
  • JVM Free memory: 91.98 MB Total memory: 123.75 MB Max memory: 989.87 MB Memory Pool Type Initial Total Maximum Used Eden Space Heap memory 34.12 MB 34.12 MB 273.06 MB 24.47 MB (8%) Survivor Space Heap memory 4.25 MB 4.25 MB 34.12 MB 4.25 MB (12%) Tenured Gen Heap memory 85.37 MB 85.37 MB 682.68 MB 3.04 MB (0%) Code Cache Non-heap memory 0.15 MB 1.87 MB 32.00 MB 1.85 MB (5%) Perm Gen Non-heap memory 12.00 MB 12.00 MB 64.00 MB 9.30 MB (14%) "ajp-bio-8009" – orak Sep 26 '13 at 14:38
  • it is showing 64mb and i am getting the error when its usage ramps up to 99% – orak Sep 26 '13 at 14:40
  • Look at this for optimizing memory use (http://java.dzone.com/articles/busting-permgen-myths) – luiso1979 Sep 26 '13 at 14:43
0

As your settings seem ok, check the way you apply them: If you start tomcat via batch file, create setenv.bat with the content

  CATALINA_OPTS="-Dyour-settings-from-above ... all of them"

If you start a service, you'll need to update the service configuration - as I'm not on Windows, it's a long time since I did that. Did you use the tomcatw.exe to create/configure the service? Not sure...

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
  • starting tomcat using windows service...added options in java tab of tomcat7w.exe – orak Sep 26 '13 at 14:54
  • doesn't tomcat7w.exe have specific memory settings on one of its tabs? I suspect that you give these command line options, but tomcat7w.exe configures (overrides) the memory based on the settings that you do explicitly in the UI. Sorry, I can't check as it's a windows tool. – Olaf Kock Sep 26 '13 at 15:04