java.lang.OutOfMemoryError: GC overhead limit exceeded when starting my server.

1,532 views
Skip to first unread message

Olivier Masseau

unread,
Jun 3, 2014, 4:58:24 AM6/3/14
to javam...@googlegroups.com
Hello,

Today, I could not start my server (Jboss 7.1.1 Final) anymore when JavaMelody 1.50.0 is enabled.

I got this message:

java.lang.OutOfMemoryError: GC overhead limit exceeded
Dumping heap to java_pid1624.hprof ...
10:42:02,126 WARN  [net.bull.javamelody] (javamelody AofWeb) exception while collecting data: java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.LinkedHashMap.createEntry(LinkedHashMap.java:442) [rt.jar:1.7.0_25]
at java.util.HashMap.addEntry(HashMap.java:856) [rt.jar:1.7.0_25]
at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:427) [rt.jar:1.7.0_25]
at java.util.HashMap.put(HashMap.java:484) [rt.jar:1.7.0_25]
at net.bull.javamelody.CounterRequest.addChildRequests(CounterRequest.java:294) [javamelody-1.50.0.jar:]
at net.bull.javamelody.CounterRequest.addHits(CounterRequest.java:317) [javamelody-1.50.0.jar:]
at net.bull.javamelody.Collector.collectCounterData(Collector.java:620) [javamelody-1.50.0.jar:]
at net.bull.javamelody.Collector.collect(Collector.java:332) [javamelody-1.50.0.jar:]
at net.bull.javamelody.Collector.collectWithoutErrors(Collector.java:305) [javamelody-1.50.0.jar:]
at net.bull.javamelody.Collector.collectLocalContextWithoutErrors(Collector.java:295) [javamelody-1.50.0.jar:]
at net.bull.javamelody.FilterContext$CollectTimerTask.run(FilterContext.java:56) [javamelody-1.50.0.jar:]
at java.util.TimerThread.mainLoop(Timer.java:555) [rt.jar:1.7.0_25]
at java.util.TimerThread.run(Timer.java:505) [rt.jar:1.7.0_25]

Disabling JavaMelody solves the problem.



evernat

unread,
Jun 3, 2014, 7:12:25 AM6/3/14
to javam...@googlegroups.com
Hi Olivier,

There is not enough information to diagnose the cause.
For example, it would help to have the java command line starting the server (with Xmx etc).
And / or it would be great to have an idea of the statistics in your monitoring reports (if you can't have the reports anymore, you can find the last one at: javamelody storage directory/last_shutdown.html): you may send the report to me in private.
And I see that a heap dump file was written to "java_pid1624.hprof", you can open the heap dump file in eclipse MAT.

It's probably just a memory or configuration issue on your server.

bye,
Emeric

Vernat Emeric

unread,
Jun 5, 2014, 9:23:48 AM6/5/14
to javam...@googlegroups.com
Hi again,

Ivo from the plumbr team wants to add the following information about OOM.
(I approve Ivo involvement in this group, but obvious commercial advertisement with pricing link removed from the message).
The “java.lang.OutOfMemoryError: GC overhead limit exceeded” error means that GC has been trying to free the memory but is pretty much unable to get any job done. By default, it happens when the JVM is spending more than 98% of the total time in GC and after the GC less than 2% of the heap is recovered.

So – the “java.lang.OutOfMemoryError: GC overhead limit exceeded” error will be displayed when your application has exhausted pretty much all the available memory and the GC has repeatedly failed to clean it.

In many cases, you would get away by just increasing the heap size via -Xmx parameter. [ad removed]

--

---
You received this message because you are subscribed to the Google Groups "javamelody" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javamelody+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

christian...@gmail.com

unread,
Aug 19, 2014, 11:07:26 AM8/19/14
to javam...@googlegroups.com
I'm currently also having memory issues with JavaMelody.

I've done some tests, running the same heavy tests with and without JavaMelody, installed on JBoss 4.2.3 (with server hotspot).

With my tests, JavaMelody running, I exhaust my 512MB of heap in 5 minutes

When I disable JavaMelody, my tests have run for 1 hour without exhausting the heap.

When I look at the content of the Old Gen (using Visual VM), HashMap and HashMap entries fill in 41% of it.
OldGenUsage.jpg

Emeric Vernat

unread,
Aug 19, 2014, 11:20:16 AM8/19/14
to javam...@googlegroups.com

Hi,

It would be great to have an idea of the statistics in your monitoring reports, to see what kind of requests you have and how many (if you can't have the reports anymore, you can find the last one at: javamelody storage directory/last_shutdown.html). You may send the report to me in private.

Emeric

christian...@gmail.com

unread,
Aug 21, 2014, 9:16:18 AM8/21/14
to javam...@googlegroups.com
Thank you for your quick reaction, Emeric.

After check at JBoss logs, I've discovered that my test was generating a huge number of HTTP errors. This is likely the cause (maybe you keep error information in a HashMap?), because, after correcting my test, the problem disappeared.

Kind regards

Christian
Reply all
Reply to author
Forward
0 new messages