aspose file tools*
The moose likes BEA/Weblogic and the fly likes Application out of heap space : restart application or restart application server ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Application out of heap space : restart application or restart application server ?" Watch "Application out of heap space : restart application or restart application server ?" New topic
Author

Application out of heap space : restart application or restart application server ?

Luc Claessens
Greenhorn

Joined: Feb 24, 2011
Posts: 1
Hello,

Got this running application server on which runs... applications. Now one of them runs out of memory (see trace below).

2011-02-08 04:55:20,286|ERROR|
***snip snip***
java.lang.OutOfMemoryError: Java heap space

The approach we have now when it happens : is to shutdown the server through the Admin console and restart the server again.
admin console -> domain -> environment -> servers (shutdown, start)

As this is a live system at our customers site, we cannot experiment with it, but should it not be possible to just do a restart of the deployment
admin console -> domain -> deployments (stop, start)
anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

Hi,

Just doing a server re-start might not be a permanent solution to the out of memory issues. You need to go to the root cause of it.

java.lang.OutOfMemoryError: Java heap space

This error indicates that there is no enough heap space available for the creation of the Java Objects.

There could be many reasons causing this situation.
1. If the application is generating more objects (consuming more heap space) than the one allocated one.
2. If the application is not releasing the resources associated with the objects even after a Garbage Collection. This situation is called Memory leak.

For different types of Out Of Memory issues refer the below link.

http://weblogic-wonders.com/weblogic/2010/12/30/different-out-of-memory-issues/

In both the case, you might need to profile your application so that you can get to the root cause of the issue and avoid any discrepancies in the production environment.

Note: Profiling tools would consume extra resources.

There are many profiles tools available for troubleshooting Out Of Memory related issues. Profiler tools like JProfiler, YouKit etc can be used.


Below link shows how JProfile can be used with WebLogic Server.

http://weblogic-wonders.com/weblogic/2010/06/10/using-jprofiler-with-weblogic-server/

Below link shows how YourKit profiler tool can be used with WebLogic Server.

http://weblogic-wonders.com/weblogic/2010/12/23/integrate-yourkit-java-profiler-with-a-standalone-weblogic-server/

Cheers,
Anandraj
http://weblogic-wonders.com

Regards,
Anandraj
http://weblogic-wonders.com
Follow us on facebook:
https://www.facebook.com/weblogicwonders
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Application out of heap space : restart application or restart application server ?