Search code examples
mulepermgencloudhub

java.lang.OutOfMemoryError: PermGen space in CloudHub


I am getting a permgen space issue when trying to run an application. The application has a couple of select db calls and then tries to connect to salesforce system using the Salesforce connector. However, as soon I reach the point to connect to salesforce, I always get the following exception from the first deployment. Is there a way on cloudhub that I can do the profiling or debug the issue or give it more memory?BTW I am using one worker with 1.5GB of memory.

********************************************************************************
Message               : PermGen space (java.lang.OutOfMemoryError). Message payload is of type: LinkedHashMap
Code                  : MULE_ERROR-29999
--------------------------------------------------------------------------------
Exception stack is:
1. PermGen space (java.lang.OutOfMemoryError)
  java.lang.ClassLoader:-2 (null)
2. PermGen space (java.lang.OutOfMemoryError). Message payload is of type: LinkedHashMap (org.mule.api.MessagingException)
  org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

Solution

  • If you're using a Mule 3.6.1 worker, this is a known issue that will be resolved soon. Unfortunately, Mule 3.6.1 CH workers have a low permgen setting. Could you try downgrading to Mule 3.6.0 and see whether the issue persists?

    HTH,

    Justin