简体   繁体   中英

Keep getting java.lang.OutOfMemoryError: PermGen space error

I am required to start few servers locally. I keep getting the "java.lang.OutOfMemoryError: PermGen space" error every now and then. I tried to increase my JVM size by the following command. export MAVEN_OPTS="-Xmx128m -XX:MaxPermSize=512m"

After running the above command, I see that the MAVEN_OPTS is correctly updated. $ echo $MAVEN_OPTS -Xmx128m -XX:MaxPermSize=512m

However, after a few minutes from starting the servers I get an out of memory error.

$ echo $MAVEN_OPTS -Xmx512m:wq

Can someone please tell me what causes the properties to change and what does the :wq come from?

wq is the vim command for save and exit. Looks like your jvm options got corrupted with that. Can you remove that and retry.

Increasing -XX:MaxPermSize is the correct thing to do here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM