-1

When I deploy and run my project in netbeans, I am getting this error.. And even after setting up JAVA_OPTS and CATALINA_OPTS in environmental variables as well as in netbeans 'VM options' as -Xms512m -Xmx2048m, I am getting same error.. Please, help me out to sort it out..

Exception in thread "http-bio-8080-exec-2" java.lang.OutOfMemoryError: PermGen space
Cœur
  • 37,241
  • 25
  • 195
  • 267
Virtual Realist
  • 175
  • 6
  • 19
  • increase permgen space – Kalaiarasan Manimaran Feb 17 '15 at 06:26
  • 1
    look here: http://stackoverflow.com/questions/3003855/increase-permgen-space – Thomas Stets Feb 17 '15 at 06:27
  • where to give this one ... -XX:MaxPermSize=2048m – Virtual Realist Feb 17 '15 at 06:28
  • I already set up the permgen space as '-Xms512m -Xmx2048m' – Virtual Realist Feb 17 '15 at 06:29
  • 2048m perm gen size is way too much. Default is 64m, try increasing it to 128m (like -XX:MaxPermSize=128m). And with "-Xm..." you don't set your perm gen size, but the heap size. Read the answers to the question I linked above. – Thomas Stets Feb 17 '15 at 06:42
  • Still I am getting, this error.......... SEVERE: Servlet.service() for servlet [mvc-dispatcher] in context with path [/datainput] threw exception [Handler processing failed; nested exception is java.lang.OutOfMemoryError: PermGen space] with root cause java.lang.OutOfMemoryError: PermGen space – Virtual Realist Feb 17 '15 at 07:09
  • Can you show us the complete list of VM options you use when starting the Java VM? – Thomas Stets Feb 17 '15 at 07:11
  • This is the VM option that I set up in Netbeans.. -Xms512m -Xmx1024m... And also I created setenv.bat file in apache-tomcat/bin/setenv.bat and added '-Xms512m -Xmx1024m' but, still it is not working properly – Virtual Realist Feb 17 '15 at 07:18
  • and also I am getting this error too.... Could not complete request org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: PermGen space – Virtual Realist Feb 17 '15 at 07:18
  • Did you read *any* of my comments? -Xm... does *not* affect your perm gen space. – Thomas Stets Feb 17 '15 at 07:27

1 Answers1

0

if you start Tomcat from netbeans the -XX:MaxPerm... must go to server setting not JVM settings (or JAVA_OPTS).

  • go to sevices tab on the left
  • expand servers and right click on your tomcat
  • on the Platform tab, provide the necessary settings under VM options (for example -XX:MaxPermSize=256m -Xmx2048m )
Zielu
  • 8,312
  • 4
  • 28
  • 41