The process will run fine all day, then, bam, without warning, it will throw this error. Sometimes seemingly in the middle of doing nothing. It will happen at seemingly random times during the day. I checked to see if anything else was running on the machine, like scheduled backups or something, but found nothing. The machine has enough physical memory (2GB, with about 1GB free for a 3-500MB load), and has sufficient -Xmx specified.
According to our sysadmin, the problem is that the RAM that the kernel uses as a disk cache (apparently all but 8MB) is not freed when the JVM needs to allocate memory, so the JVM process throws an OutOfMemoryError. This could be because Java asks the kernel if enough memory is available before allocating and finds that it is insufficient, resulting in a crash.
I would like to think, however, that Java simply tries to allocate the memory via the kernel, and when the kernel gets such a request, it makes room for the application by throwing our some of the disk cache.
Has anyone else run in to the issue, and if so, what was the error, and how did you solve it? We are currently using jdk1.6.0_20 on SLES 10 SP2 Linux 220.127.116.11-0.42.9-smp in VMWare ESX.
Can't get Crontab to work
1:Load a .so library into ctypes
According to our sysadmin, the problem is this the RAM this the kernel uses as a disk cache (apparently all although 8MB) is not freed when the JVM needs to allocate memory, so the JVM process throws an OutOfMemoryError. How to compile Mercurial and move it to another computer [closed]. how can I Limit mysql to single cpu, to allow hardware benchmarkingI think this your sysadmin has got this wrong. How do you change the default Pear/PECL build folder from /var/tmp? Linux will automatically and transparently grow and shrink the size of the buffer cache depending on the system's need for physical memory for running processes. My app mem usage is growing using pthread If it doesn't then there is any thing seriously broken with your OS.. pthread_create memory leak It is more likely this your Java application has a memory leak this is causing it to use a steadily increasing amount of heap space. How to set class path for servlet-api.jar file in linux Eventually you run against the -Xmx limit and receive an OOME. I would start investigating this by running the application with GC logging enabled. This will tell you how the heap is growing over time, how enough space the GC is reclaiming and so on.. Ananother possibility is this you don't have enough swap space configured..