Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid Permgen Space error when running Tomcat from Eclipse

What is the best way to avoid permgen space error when running Tomcat from Eclipse 3.6? Is this done by adding the following line:

-XX:MaxPermSize=512m

at the end of eclipse.ini? Or is there extra configuration necessary?

like image 441
fresh_dev Avatar asked Oct 24 '11 15:10

fresh_dev


1 Answers

The configuration in eclipse.ini is only for the JVM that actually runs Eclipse.

Tomcat is run in its own JVM instance, so you'll need that separately.

Assuming you use WTP to start your Tomcat instance, you need to go to your Server configuration, click "Open launch configuration" and there (on the "Arguments" tab) edit/add the VM arguments to include the desired -XX:MaxPermSize argument.

like image 81
Joachim Sauer Avatar answered Sep 28 '22 10:09

Joachim Sauer