Something keeps killing my Java process on Ubuntu, does anyone know why?

So, every couple of days my java process on Ubuntu is automatically killed, and I can’t understand why.

In my box, 35.84 GB of RAM, when I start my Java process, I pass it the -Xmx28g parameter, so it should use a path less than the maximum RAM available.

I ran jstat as follows:

# jstat -gccause -t `pgrep java` 60000

The last few lines of output from jstat just before the process was killed were as follows:

Time     S0     S1     E      O      P       YGC   YGCT       FGC FGCT     GCT     LGCC                 GCC
14236.1  99.98   0.00  69.80  99.40  49.88   1011  232.305    11  171.041  403.347 unknown GCCause      No GC
14296.2  93.02   0.00  65.79  99.43  49.88   1015  233.000    11  171.041  404.041 unknown GCCause      No GC
14356.1  79.20   0.00  80.50  99.55  49.88   1019  233.945    11  171.041  404.986 unknown GCCause      No GC
14416.2   0.00  99.98  24.32  99.64  49.88   1024  234.945    11  171.041  405.987 unknown GCCause      No GC

This is similar to what happened in / var / log / syslog at this time: https://gist.github.com/1369135

Nothing works on this server except my java application. What's happening?

edit: java- 1.6.0_20, , java , "-server -Xmx28g". , " -".

+5
5

( ).

, - OOM, .

,

  • JVM , 28Gb; ,

  • .

, .

JVM.


, "-Xmx..." , , JVM. JVM , , , .

+5

OOM-killer, Linux, . , Google .

OOM, , "swappiness". :

/etc/sysctl.conf:vm.swappiness=20

http://www.gentooexperimental.org/~patrick/weblog/archives/2009-11.html.

+6

JVM ? ? , , - .

, , , , Linux .

+2

, 28 ?! , , 50% ( 18 15 ). 171 Full GCs ! ? 171 2-3 . , OOM - , ( JVM ). , , , (-Xss). . , .

+1

Ubuntu has a watchdog process that kills other processes when memory is running low. See the man page: http://manpages.ubuntu.com/manpages/natty/man8/watchdog.8.html

+1
source

All Articles