sexta-feira, 9 de janeiro de 2015

How to fix the PermGen Out of Memory Error

How to fix the PermGen Out of Memory Error

The PermGen Out of Memory Error is a very common memory leak error in any application running in an JVM instance.

First of all, what is the PermGen in a JVM?

PermGen stands for permanent generation and it is the memory area used for storing class and method objects. By default most application as a low value configured for the maximum permGen space size, as low as 256m.

Sometimes, when a large number of classes are loaded you’ll have a PermGen Out of Memory error, making the application becoming slower to respond till it does not responds at all.

How can i fix it?

Luckily this one is easy to solve. Access the launch configuration of your application server and look for the VM arguments. You’ll find a parameter that defines the maximum size for PermGen:

-Xmx1024m -XX:MaxPermSize=256m

Change it to:

-Xmx1024m -XX:MaxPermSize=512m

Save and restart the server.

Sem comentários:

Enviar um comentário