JBOSS PermGen space out of memory

JBOSS PermGen space out of memory



The application got stuck, accessing JBoss server log located in:

We realized that the following out of memory error has occurred:
     java.lang.OutOfMemoryError: PermGen space


The Permanent Generation space stands for a fixed place in memory in which the Virtual Machine stores "classes/bytecodes" and "class metadata". When this place, not managed by the Garbage Collector, gets full the error "java.lang.OutOfMemoryError: PermGen space" is issued. This type of error could happen at application startup or using OutSystems J2EE Platform whenever huge deployment activities are performed. This happens because classes are able to be loaded not only during startup but sometimes on the fly due to Java dynamic behavior.


To overcome this occurrence one should adjust the memory Permanent Generation size according to its needs in order to accommodate any outstanding memory demand. The MaxPermSize parameter should be increased in order to face any memory demand, a plausible value would be "-XX:MaxPermSize=1024m". MaxPermSize parameter is located in file:


Best Regards

Carlos Cabral

We have been experiencing the same problem in our development environment.

We restart jboss server every time this happens. Does anyone still experience this problem?

Info: The conf file is now (Platform version 8) allocated at 'standalone-outsystems.conf'.

This problem occurs whenever there's a lack of sufficient permgen to accomodate the currently loaded classes / strings.

If you are having this frequently you can either have a too strict configuration, or be experiencing memory leaks in the classloader. How much PermGen do you have configured? How often does this happen?

You can turn on GC logs on the standalone-outsystems.conf file to take a deeper look at the memory usage evolution and better understand the situation.

Best regards,
Ricardo Silva
Hi Ricardo, thanks for the information.

We have this slowness problem weekly. And our team is not that big yet...

PermGen is configured with 1024.

I'll study the GC logs. Thanks.

Hi Melo,

We too are facing the same issue and the frequency is almost everyday. What are you observations after increasing permgen space to 1024?  BTW our permgen space is 1024 though. This is happening in all our environments.

Any information on this will be appreciated.

Hello Sudhakar,

Depending on the amount of memory you have and the number of espaces, 1024 may be too low, specially for a development environment. For a development environment I would recommend at least 2048m.

What version of the OutSystems Platform are you running? We've made some significant improvements on 9.1.401.0, so you should update to at least that one.

Good to know about these improvements Ricardo. Could you be more specific about it?

I'm on a new project now, and experiencing the same problemas on the Java development environment. We have to restart the JBoss every day.

Now we're managing to upgrade to 9.1, and we're gonna take a good look at this.