1 Reply Latest reply on Jan 18, 2016 4:22 PM by Erhard Siegl

    multiple deployments cause cannot allocate memory errno 12

    KL Chan Newbie


      Investigation with heap dump suggest every deployment I made, a new ModuleClassLoader is created in heap and won't unload after redeploy/remove from management console.

      The following is the result after 6 deployment of 2 war (ie 12 class loaders)



      I am not sure is this a bug? I think i can avoid this by restart after deployment, but did i miss something in my config?

      The Wildfly 9 is on AWS ubuntu with oracle java 8 jdk, deployed by wildfly maven plugin 1.10 alpha 5 with goal deploy-only.

        • 1. Re: multiple deployments cause cannot allocate memory errno 12
          Erhard Siegl Novice

          I have no experience with WildFly9, but with other versions. Also with Java8, the organisation of PermGen space changed. Maybe it still helps.

          In my opinion this is a bug somewhere. I spent some time debugging such issues and find them quite difficult to discover, even with MAT. I encountered:

          • Bug in application server
          • Bug in Oracle driver
          • Use of ThreadLocal in user-code
          • Slow free of Soft References (-XX:SoftRefLRUPolicyMSPerMB=1 might help)


          Try to find path to GC-root excluding all soft/weak/phantom references. If you are lucky, you find strong references (e.g to a ThreadLocal).

          If you find only soft references -XX:SoftRefLRUPolicyMSPerMB=1 might help (if available in your JDK).