Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top