Can the JVM(Oracle) run into an OutOfMemory error if the heap size is below the max?
Posted
by
user439407
on Server Fault
See other posts from Server Fault
or by user439407
Published on 2012-12-19T11:09:50Z
Indexed on
2012/12/19
17:04 UTC
Read the original article
Hit count: 212
I am running a Tomcat site(with an NGinx front end) that seems to be randomly running out of memory even though the max heap size is pretty large. My question is is it possible for the JVM to get an OutOfMemory error even if the heap size is significantly less than -Xmx? For instance, here is a snapshot I took just 15 seconds before an OutOfMemory error:
Tue Dec 18 23:13:28 JST 2012 Free memory: 162.31 MB Total memory: 727.75 MB Max memory: 3808.00 MB
I guess theoretically it's possible that my code generated 3 gigs worth of objects in 15 seconds, but I highly doubt it. It seems like the JVM was unable to grow the heap even though it theoretically had room....Is it possible that other processes started using memory to the point that the JVM could not grow? I am running 64-bit Oracle Hotspot on a 64 bit vm running CentOS 5 with 6 gigs of ram.
© Server Fault or respective owner