Note that there are some explanatory texts on larger screens.

plurals
  1. PONetBeans/Glassfish and PermGen space bug when redeploying (yes, STILL happening)
    primarykey
    data
    text
    <p>I know this has probably been asked many times before, but I still haven't seen an actual fix for it.</p> <p>My day-to-day development environment is as follows: 1. NetBeans (latest), 2. Glassfish (latest as bundled with NB), 3. JPA, JSF, JAXB, Jersey for JAX-RS</p> <p>I have about 600 classes in my project, spread across two EJB projects and one WAR project, all inside an EAR.</p> <p>I am on latest JDK 7 (on OS X) and I am on an hourly basis getting the infamous "PermGen space" bug. Let's say if I am doing 3 incremental re-deploys a minute, I can only work for a short while before either:</p> <ul> <li>Glassfish run out of PermGen space, so I just have to kill the process.</li> <li>Deployment becomes extremely slow, due to me having increase max permgen space (as one is advised to do from dozens of answers on S.O.)</li> </ul> <p>Often the only solution is to kill glassfish every 30 minute or so. It's definitely due to a bug somewhere that simply loads new classes for every new incremental re-deploy instead of getting rid of the old ones. I thought this was supposed to be fixed in JDK 7?</p> <p>This has been a <em>long standing</em> bug in the kind of development environment, and I am rather shocked that it's still going on after my 5+ years of Java development. It's just so frustrating and incredibly unproductive.</p> <p>(<strong>Just before anyone suggests increasing permgen space</strong>, believe me I've tried that, and the only thing it "solves" is to prolong the inevitable. I've seen redeployments take up to 400 seconds at its worst. Redeployment is supposed to take 5-6 seconds for a project this size, no more.)</p> <p><strong>EDIT</strong>: I ran jmap and jhat on the Glassfish process after the following steps:</p> <ol> <li>Start glassfish</li> <li>Deploy my EA</li> <li>Undeploy my EA</li> <li>Then did a heap dump with jmap</li> </ol> <p>It turns out that all my classes (which should have been unloaded) are still loaded! Hopefully this is useful information to someone reading this...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload