Appreciate your response.
Thank you.
Vasu
Why ?
Rule of thumb is you don't want to tell GC when to run.
By the way, WebSphere v5.0 is no longer supported by IBM.
Regards,
Brian
> Anybody can help me, how to force garbage collection manually on the
> websphere application server V5.0 admin console, whenever JVM reaches
> certain limit say 512 MB. My current miimum JVM heap size settings is
> 256 MB and maximum heap size is 1 GB.
You can't, but you can ;-)
If your application has a web archive, create a JSP page with "System.gc
();" inside it (as java code). Once you go to the JSP page, it'll invoke
a System gc (unless the application server is running with -XX:
+DisableExplicitGC or equivalent).
However, forcing a GC is bad practice. It performs a "Full GC", which
freezes the application for a (short) while.
Also, GCs don't resolve memory leaks - they only collect unreferenced
objects. As a rule, it is best to tune your JVM and have it perform its
GCs when it deems it necessary.
Wkr,
Sven Vermeulen
Excellent tip, I am going to try this with a servlet.
Thanks a lot.