java - NetBeans/Glassfish and PermGen space bug when redeploying (yes, STILL happening) -
i know has been asked many times before, still haven't seen actual prepare it.
my day-to-day development environment follows: 1. netbeans (latest), 2. glassfish (latest bundled nb), 3. jpa, jsf, jaxb, bailiwick of jersey jax-rs
i have 600 classes in project, spread across 2 ejb projects , 1 war project, within ear.
i on latest jdk 7 (on os x) , on hourly basis getting infamous "permgen space" bug. let's if doing 3 incremental re-deploys minute, can work short while before either:
glassfish run out of permgen space, have kill process. deployment becomes extremely slow, due me having increment max permgen space (as 1 advised dozens of answers on s.o.)often solution kill glassfish every 30 min or so. it's due bug somewhere loads new classes every new incremental re-deploy instead of getting rid of old ones. thought supposed fixed in jdk 7?
this has been long standing bug in kind of development environment, , rather shocked it's still going on after 5+ years of java development. it's frustrating , incredibly unproductive.
(just before suggests increasing permgen space, believe me i've tried that, , thing "solves" prolong inevitable. i've seen redeployments take 400 seconds @ worst. redeployment supposed take 5-6 seconds project size, no more.)
edit: ran jmap , jhat on glassfish process after next steps:
start glassfish deploy ea undeploy ea then did heap dump jmapit turns out classes (which should have been unloaded) still loaded! useful info reading this...
surely, bug, , don't think there easy solution that. (if there were, have had already).
what can try: utilize hot code replacement tool illustration jrebel, way don't have deploy time, instead tool watches changes of .class files (and other web resources, if configure so), , replaces class definition within running jvm. sounds cool, right?
it works java agent, starts when jvm starts.
there 3 drawbacks of solution: deployment bit slower, it's harder debug, , it's proprietary software (but not cost much)
java netbeans glassfish permgen
No comments:
Post a Comment