In recent days, I observed WildFly server is giving an error
java.lang.OutOfMemoryError: Metaspace error
and the server terminates OR stops serving your requests.
This was happening when I redeploy an application of keep the server on for certain time.
I did little research and found that we need to tweak the configuration of JBoss / WildFly server to increase meta space. Do not increase it too much as we need to maintain balance between meta space and heap.
To do that open [WildFly / JBoss home]/bin/standalone.conf
Search for -XX:MaxMetaspaceSize
There you would find -XX:MaxMetaspaceSize=256m
Change it to -XX:MaxMetaspaceSize=512m
It looks something like this
Restart the server and you are done.
No comments:
Post a Comment