Link to home
Start Free TrialLog in
Avatar of Steve Sperber
Steve SperberFlag for United States of America

asked on

Is there a way to fix "PermGen Space" outofmemory errors in a low memory machine hosting 10 web applications?

My Web application is giving PermGen Space errors every 10 days on the Weblogic app server. What should I do? About 10 applications are hosted.


When the Weblogic server needs to be restarted every time, what are the commands and where can we find the Weblogic logs?

User generated image

ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Steve Sperber

ASKER

Thanks, David, I cannot do either of them.

But For now, I will keep moving by restarting the Weblogic server.

with minimum effort and the safest way, how do I restart the Weblogic server so that all the running apps restart and get the PermGen Space error go away.
From the UI preferably or else from the command line.
An ugly trick you can do...

1) Write a script to test memory usage + swap usage.

2) If either RAM or SWAP usage exceeds a certain threshold, then kill off Weblogic + restart it.

3) If you're bouncing Weblogic (stop/restart) anyway, this must be acceptable... so if you have a background script do this for you, you can simply ignore the problem... letting your script do all the work.

4) When writing a script like this, build in a cool down period... say 1 minute is minimum restart time, because if this problem gets worse + you end up doing a fast cycle of kill + restart, you can end up in a situation where you can't do any work on the machine because all CPU cores are spinning at 100%.