-
The java application crash once a week (4 messages)
- Posted by: guanyan xu
- Posted on: December 25 2006 11:57 EST
I have a java application that crash once a week, very strange, and i have check it for weeks, and cannot find any bugs in the code, is that the JVM's bug? The java application is running on linux, slackware 10.1, kernel 2.6.13.3, SMP, NPTL. java version is 1.5.0_07. the command line is: -Xmx1224m -Xms1224m -Dcom.sun.management.jmxremote.port=1111 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false, when the application started, use the command top on linux, you can see: VIRT = 2223m RES = 1.2g SHR = 10m that means the virtual memory is about 2223m, but the VIRT will increase all along, about 1 week after the application started, the VIRT will increase to be almost 3g, when it reaches 3g, the application will crash(do not response any more, but the process is still there). i know the in the 32bit OS, one process's virtual memory cannot greater than 3g (64bit can) , but i am so confused , why the virtual memory in my application will always increased ? i have set the -Xmx to be 1224m, and i set my application's internal thread is always 1500, cannot increased, but why the virtual memory is still increased all the time ? it this the JVM's bug ? how can i solve this ?Threaded Messages (4)
- Re: The java application crash once a week by Chetan Khandar on December 25 2006 21:55 EST
- Use jconsole before that... by Rajesh Balamohan on December 26 2006 10:06 EST
- Re: The java application crash once a week by Christopher Stach II on December 27 2006 08:07 EST
- It might have run OOM by Bogdan Dimitriu on January 25 2007 10:42 EST
-
Re: The java application crash once a week[ Go to top ]
- Posted by: Chetan Khandar
- Posted on: December 25 2006 21:55 EST
- in response to guanyan xu
I think there is something wrong with your code, Did you try using Wily or jprobe ? it;s a excellent way to find any potential issues in code, of-course it will also show if there is a memory leak in JVM (which I think is highly Unlikely.) HTH Chetan Khandar -
Use jconsole before that...[ Go to top ]
- Posted by: Rajesh Balamohan
- Posted on: December 26 2006 10:06 EST
- in response to guanyan xu
You have enabled jmx port. Why don't you try checking the memory usage with JConsole. How is the memory usage in the JConsole chart?. If JVM crashes it would generate a core dump or a hs_*.log. Can you post it here. 1. Check the memory usage of JVM using JConsole. 2. Check JVM PermSize in JConsole 3. Check if you are using any native code. ~Rajesh.B -
Re: The java application crash once a week[ Go to top ]
- Posted by: Christopher Stach II
- Posted on: December 27 2006 08:07 EST
- in response to guanyan xu
You said yourself that the process continues to run but is unresponsive, so how exactly does that equate to a crash? I'll give you a hint: it's not a JVM crash. You have a bug/bugs in your code. Run your app in a profiler and find where the object retention is happening. -
It might have run OOM[ Go to top ]
- Posted by: Bogdan Dimitriu
- Posted on: January 25 2007 10:42 EST
- in response to guanyan xu
Check your default console output for your application. You might have a message like "OutOfMemoryError" at some point. That's what make any new allocation fail. And also, don't trust "top". Use an utility like "jconsole" to peek on your memory utilisation. You might have some object leaking somewhere which keeps building up. Bogdan