One bug that we are aware of in JDeveloper 11g is that there is a memory leak if you do many repeat runs of an application.
However there is an easy way to eliminate most of those by changing the a setting in the specs for the integrated server.
Locate the file: setDomainEnv.cmd which should be at:
[JDev Install Dir]\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\bin
There find the line:
set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=128m
and change it to:
set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=512m
Now try and run your projects again.
Comments (12)
And, of course, on Unix/Linux, the file to edit is setDomainEnv.sh
Posted by John Stegeman | March 5, 2009 1:07 AM
Posted on March 5, 2009 01:07
Hi!
I have external WLS server and I'm deploying my applications to that external server. And it happens there too. After three or maybe four deployments I get PermGen Error.
Server settings are
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m
.
WLS Start Mode=Development
I will change this, I just wanted to say that maybe this error is not JDevelopers deployment process issue.
ADF on!
Janez
Posted by jlavric | March 5, 2009 5:54 AM
Posted on March 5, 2009 05:54
Shay thanks for this - it solved my problem - it was getting very annoying but this setting seems to have done the trick.
Darragh
Posted by Darragh Duffy | March 7, 2009 6:01 AM
Posted on March 7, 2009 06:01
I used such settings before, but it seems the solution for me was to clean "drs" directory if application runs to slow or cached previous deployment.
MEM_MAX_PERM_SIZE=-XX:MaxPermSize=512m i think is to much for Perm memmory - even for big applications.
Probably the problem is not in this settings.
Posted by Pavel | March 9, 2009 12:34 AM
Posted on March 9, 2009 00:34
drs directory is the deployment dir of weblogic and has NOTHING to do with mem. You clean drs to remove old redeployments.
512MB might be too much but this is cos weblogic has a mem leak. So eventually you will run out of mem. So, the > the permsize the > the time you get with no out of mem error.
Savvy?
PS: Yes the problem is in the mem leak if that is what you mean, but untill then that is a damn good workaround.
Posted by Jerome | March 10, 2009 6:27 AM
Posted on March 10, 2009 06:27
It got better when configuring these settings, but I still get PermGen error after like 10 runs of my application. Before I configured WLS, it happened about every 3rd time I run the app. Anything else I could do to get rid of this completely?
thanks
Posted by Andre | March 10, 2009 11:53 PM
Posted on March 10, 2009 23:53
There is a limitation on the total mem that a java app can have under windows 32bit. This is something from the net:
Win32 (Win2K, XP, 2K3): roughly 1300m (+/- 100m)
Linux (2.6 kernels): safe upto about 2500m; higher if you dare
Solaris 8 and 9: ~ 3000m (but you can push it up to 3500m sometimes)
(http://forums.sun.com/thread.jspa?threadID=765037)
In order to use 512MB as perm mem, you cannot increase xmx much more than 768MB.
So far I tested perm mem = 256MB and xmx=1024, and when I got perm mem out of exception, the mem used by java process of weblogic was 621MB.
Conclusively, I think that there is a trade off between max perm mem and max xmx.
I am using perm mem=512MB & xmx=768MB now and so far everything's OK
Posted by spido | March 11, 2009 1:01 AM
Posted on March 11, 2009 01:01
Shay, perhaps you should consider pointing out that if users deploy to a WLS instance that is running the JRockit JVM, then PermGen errors do not happen at all as it's garbarge collection mechanisms are different than Sun's.
James
Posted by Anonymous | March 20, 2009 4:25 AM
Posted on March 20, 2009 04:25
@James, I actually just posted about this on the JDeveloper forums and showed an approach for how to set up your development environment to use JRockit for running the integrated WLS: http://forums.oracle.com/forums/thread.jspa?threadID=879103
John
Posted by John Stegeman | March 31, 2009 3:39 AM
Posted on March 31, 2009 03:39
Thanks for all of you, This solved the perm Gen space memory problem
Posted by Ahmed Elhamy | April 1, 2009 12:45 AM
Posted on April 1, 2009 00:45
As far as we 're talking about mem problems, you know this
http://andrejusb.blogspot.com/2009/06/jdeveloper-11g-ide-performance-problem.html
but
also here as some trivial solutions until oracle fixs this bug
http://developers2developers.blogspot.com/
Posted by spido | June 12, 2009 12:18 AM
Posted on June 12, 2009 00:18
And this is how is done in WLS 10.3.1
http://developers2developers.blogspot.com/
Posted by spido | July 9, 2009 4:38 AM
Posted on July 9, 2009 04:38