OutOfMemoryError - GC overhead limit exceeded
Someone asked me recently about the following exception on their ColdFusion / Tomcat server:
java.lang.OutOfMemoryError: GC overhead limit exceeded
This exception is thrown by the garbage collector (in the underlying jvm, it's not specific to Tomcat or ColdFusion), when it is spending way too much time collecting garbage. This error essentially means that you need to add more memory, or reconfigure your garbage collection arguments. You can suppress this error by adding
-XX:-UseGCOverheadLimit to your JVM startup arguments.
Here's what Sun has to say about it:
The parallel / concurrent collector will throw an
OutOfMemoryErrorif too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option
-XX:-UseGCOverheadLimitto the command line.
You can think of the
OutOfMemoryError like this. Imagine your garbage collector is a janitor in an office building. His job is to collect papers from each office, recycle the paper so the office can have new blank sheets of paper. Your janitor is going to each office to see if there is any thing in the recycling bin to collect, but most offices are using their paper (memory) and not recycling it (freeing it). The Out of Memory Error is thrown when the janitor (GC) is spending all his time going from office to office but not finding much, if any paper to recycle. It's a supply / demand problem and we either need more paper to work with (more RAM), or more efficient use of the paper we have (better code).
Like this? Follow me ↯Tweet Follow @pfreitag
OutOfMemoryError - GC overhead limit exceeded was first published on March 25, 2010.
If you like reading about java, jvm, coldfusion, garbage, collector, tuning, or performance then you might also like:
- Updating Java on ColdFusion or Lucee
- Getting Size of Heap and Non Heap Memory in CFML
- Adobe Says Go Ahead and Upgrade your ColdFusion JVM
- Java Performance Tuning Guide
- ColdFusion Garbage
- Tuning Garbage Collection
- Spring4Shell and ColdFusion
- Log4j CVE-2021-44228 Log4Shell Vulnerability on ColdFusion / Lucee
Want Security Advisories via Email?
Advisory Week is a new weekly email containing security advisories published by major software vendors (Adobe, Apple, Microsoft, etc).
This post I found has more details http://www.numtopia.com/terry/blog/archives/2007/06/coldfusion_8_monitoring_heisenberg_errors.cfm the solution in this post is:
"In the CF administrator: Go to Server Monitoring Launch Server Monitor Up at the top there should be 3 options that say Stop Monitoring, Stop Profiling, Stop Memory Tracking. Turn them off.
However, these are turned off by default ...."
Argh! What?! I'm running into more and more issues like this and I'm really becoming disappointed with Adobe. It appears they have two versions of CF now -- developer and Enterprise because Standard is all but useless in a production environment.