1

Ever since I added EclipseLink to my setup I keep getting memory errors every few minutes. It really sucks because Eclipse (IDE) can't even stop resin once that happens and I have to go to the command line to kill it. The error is usually this:

Unable to load class: java.lang.OutOfMemoryError: PermGen space

In my resin.xml I have the following hoping to correct the issue but it doesn't help:

<server-default>
    <jvm-arg>-Xmx512m</jvm-arg>
    <jvm-arg>-XX:MaxPermSize=1024m</jvm-arg>
    <jvm-arg>-Xss1m</jvm-arg>
    <jvm-arg>-XX:+CMSClassUnloadingEnabled</jvm-arg>
    <jvm-arg>-XX:+CMSPermGenSweepingEnabled</jvm-arg>
</server-default>

The last two lines are the last thing I tried and it failed quickly.

Any suggestions?

Thanks.

casolorz
  • 8,486
  • 19
  • 93
  • 200
  • You can also get the PermGen error if you set your MaxPermSize too high. 1024m works great for me, but if I up it to 4096m I get the same error. – rayd09 Aug 15 '12 at 16:03

1 Answers1

2

So far a change I made has helped: I put -XX:MaxPermSize=1024m in the Eclipse server launch configuration - vm arguments.

Someone from Caucho told me that when using Eclipse the -X arguments in resin.xml are not used, so that makes sense.

casolorz
  • 8,486
  • 19
  • 93
  • 200