Avoid Permgen Space error when running Tomcat from

2020-07-03 05:07发布

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?

2条回答
我想做一个坏孩纸
2楼-- · 2020-07-03 05:25

No. Tomcat runs in a separate JVM from eclipse. Add this option in the VM arguments of the launch configuration :

  • double-click on the Tomcat server in the Servers view
  • click on the link "Open launch configuration"
  • switch to the Arguments tab
  • add -XX:MaxPermSize=512m in the VM arguments text area
查看更多
可以哭但决不认输i
3楼-- · 2020-07-03 05:40

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.

查看更多
登录 后发表回答