由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - out of memory
相关主题
使用SNMP去monitor JBOSS里面的应用请教: eclipse setup problem (转载)
java内存泄露问题被面how to manage heap in java jvm
java memory problem with redhat enterprise土人问个J2EE的弱问题 *_<
JDK 7u11 released with two vulnerability fixes请问javax.portlet包在JDK的哪个jar文件里面(在线等)
JBoss 4.0.4 is slow down in every 20 daysHow is the Jboss AS performance?
怎样让java 程序运行快?jboss hot deployment in eclipse
JBoss Monitoring Software/ToolsJava's performance myth
[提问] The JVM could not be startedxp 是不是不支持jave 阿?
相关话题的讨论汇总
话题: memory话题: jvm话题: out话题: release
进入Java版参与讨论
1 (共1页)
s*****p
发帖数: 5342
1
最近,我的JAVA APPLICATION(running on JBoss)总是out of memory. 我
知道可以加MEMORY to JVM.已经512MB了.我想还是我的PROGRAM有问题.
我不觉得IT需要那么多.问题可能还是出在MEMORY RELEASE,因为我的
CODE有一堆LOOP.怎么才能保证快速RELEASE MEMORY呢?
3x!
c*z
发帖数: 62
2
give it 1G or 2 and let it run for a while. If it still crashes,
maybe you have memory leak. If it doesn't, it is very likely that
you application does need more memory.

【在 s*****p 的大作中提到】
: 最近,我的JAVA APPLICATION(running on JBoss)总是out of memory. 我
: 知道可以加MEMORY to JVM.已经512MB了.我想还是我的PROGRAM有问题.
: 我不觉得IT需要那么多.问题可能还是出在MEMORY RELEASE,因为我的
: CODE有一堆LOOP.怎么才能保证快速RELEASE MEMORY呢?
: 3x!

B*********h
发帖数: 800
3
run the application and get the jps id for the JVM.
start a JConsole(part of JDK, google) and watch how the memory grows. If it
keeps growing boundlessly, you have a problem. A more powerful profiler allo
ws you to monitor all object intances by type and trace back to the code whe
re they are generated.

【在 s*****p 的大作中提到】
: 最近,我的JAVA APPLICATION(running on JBoss)总是out of memory. 我
: 知道可以加MEMORY to JVM.已经512MB了.我想还是我的PROGRAM有问题.
: 我不觉得IT需要那么多.问题可能还是出在MEMORY RELEASE,因为我的
: CODE有一堆LOOP.怎么才能保证快速RELEASE MEMORY呢?
: 3x!

g*****g
发帖数: 34805
4
Give it 1GB to have a try, if it still runs out, you probably
have memory leak, find a profiler then.

【在 s*****p 的大作中提到】
: 最近,我的JAVA APPLICATION(running on JBoss)总是out of memory. 我
: 知道可以加MEMORY to JVM.已经512MB了.我想还是我的PROGRAM有问题.
: 我不觉得IT需要那么多.问题可能还是出在MEMORY RELEASE,因为我的
: CODE有一堆LOOP.怎么才能保证快速RELEASE MEMORY呢?
: 3x!

l*******r
发帖数: 2
5
如果增加JVM memory不能解决,应该考虑是否Perm Gen空间不够。
对于在container里面运行的程序,这个问题很有可能发生。
试一下 -XX:MaxPermSize=256m,或更大。
用类似VisualGC这样的工具分析一下内存,可能会更容易找到问题。

【在 s*****p 的大作中提到】
: 最近,我的JAVA APPLICATION(running on JBoss)总是out of memory. 我
: 知道可以加MEMORY to JVM.已经512MB了.我想还是我的PROGRAM有问题.
: 我不觉得IT需要那么多.问题可能还是出在MEMORY RELEASE,因为我的
: CODE有一堆LOOP.怎么才能保证快速RELEASE MEMORY呢?
: 3x!

l*******r
发帖数: 2
6
看看你有没有用static变量来直接或间接(static member -> an object -> ... -> a
Map)存放大的Map,List,Array。如果不是必须,不要这么做,应为他们可能永远都不
会被释放。

【在 l*******r 的大作中提到】
: 如果增加JVM memory不能解决,应该考虑是否Perm Gen空间不够。
: 对于在container里面运行的程序,这个问题很有可能发生。
: 试一下 -XX:MaxPermSize=256m,或更大。
: 用类似VisualGC这样的工具分析一下内存,可能会更容易找到问题。

1 (共1页)
进入Java版参与讨论
相关主题
xp 是不是不支持jave 阿?JBoss 4.0.4 is slow down in every 20 days
Stupid IBM JDK怎样让java 程序运行快?
JDK Source?JBoss Monitoring Software/Tools
Stupid IBM JVM: operator precedence[提问] The JVM could not be started
使用SNMP去monitor JBOSS里面的应用请教: eclipse setup problem (转载)
java内存泄露问题被面how to manage heap in java jvm
java memory problem with redhat enterprise土人问个J2EE的弱问题 *_<
JDK 7u11 released with two vulnerability fixes请问javax.portlet包在JDK的哪个jar文件里面(在线等)
相关话题的讨论汇总
话题: memory话题: jvm话题: out话题: release