通常,我在IBM Websphere Application Server上发现OutOfMemoryException。 我认为发生这种异常是因为我的应用程序从数据库中检索到巨大的数据。所以,我限制所有查询的WAS遵循IBM Websphere OutOfMemoryException
+ Verbose garbage collection
+ Maximum Heap size = 1024 (RAM on my server is 16 GB and now I already change to 8192)
+ Debug arguments = -Djava.compiler=NONE -Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777
+ Generic JVM arguments = -Dsun.rmi.dgc.server.gcInterval=60000
-Dsun.rmi.dgc.client.gcInterval=60000 -Xdisableexplicitgc
-Dws.log=E:\WebApp\log -Dws.log.level=debug
(ws.log and ws.log.level are my properties)
而且我发现堆转储,的javacore和卡在Profiles文件夹中的文件我认为他们可以不retreive数据超过1000条记录,并设置JVM告诉我关于问题的原因,但我不知道如何读取/使用heapdump,javacore和快照文件。
请告诉我如何防止/避免/修复OutOfMemoryException。 谢谢
OK,我会再试一次:d – 2008-10-09 17:40:46