Help needed interpreting a logged error message!! - Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

0
Hi guys, Can you please help me understand this error message and what might cause it? I was assuming this is caused by a scheduled event that creates a lot of objects, but can’t really pinpoint it to a specific action. 2019-06-04T05:55:58.703709 [APP/PROC/WEB/0]   ERROR - M2EE: An error occurred while executing action 'get_all_thread_stack_traces'. 2019-06-04T05:55:58.703719 [APP/PROC/WEB/0]   ERROR - M2EE: com.mendix.m2ee.api.AdminException: 2019-06-04T05:55:58.703761 [APP/PROC/WEB/0]       at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:160) 2019-06-04T05:55:58.703809 [APP/PROC/WEB/0]   Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded 2019-06-04T05:55:58.703818 [APP/PROC/WEB/0]       at java.util.Arrays.copyOf(Arrays.java:3332) 2019-06-04T05:55:58.703835 [APP/PROC/WEB/0]       at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124) 2019-06-04T05:55:58.703871 [APP/PROC/WEB/0]       at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:649) 2019-06-04T05:55:58.703891 [APP/PROC/WEB/0]       at java.lang.StringBuilder.append(StringBuilder.java:202) 2019-06-04T05:55:58.703964 [APP/PROC/WEB/0]       at com.mendix.thirdparty.org.json.JSONArray.toString(JSONArray.java:842) 2019-06-04T05:55:58.703980 [APP/PROC/WEB/0]       at com.mendix.thirdparty.org.json.JSONObject.valueToString(JSONObject.java:1535) 2019-06-04T05:55:58.704011 [APP/PROC/WEB/0]       at com.mendix.thirdparty.org.json.JSONObject.toString(JSONObject.java:1401) 2019-06-04T05:55:58.704014 [APP/PROC/WEB/0]       at com.mendix.thirdparty.org.json.JSONObject.valueToString(JSONObject.java:1535) 2019-06-04T05:55:58.704056 [APP/PROC/WEB/0]       at com.mendix.thirdparty.org.json.JSONObject.toString(JSONObject.java:1401) 2019-06-04T05:55:58.704068 [APP/PROC/WEB/0]       at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:134) 2019-06-04T05:55:58.704108 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) 2019-06-04T05:55:58.704115 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.Server.handle(Server.java:502) 2019-06-04T05:55:58.704171 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) 2019-06-04T05:55:58.704180 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) 2019-06-04T05:55:58.704202 [APP/PROC/WEB/0]       at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) 2019-06-04T05:55:58.704210 [APP/PROC/WEB/0]       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) 2019-06-04T05:55:58.704252 [APP/PROC/WEB/0]       at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) 2019-06-04T05:55:58.704254 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) 2019-06-04T05:55:58.704290 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) 2019-06-04T05:55:58.704302 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) 2019-06-04T05:55:58.704353 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) 2019-06-04T05:55:58.704383 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) 2019-06-04T05:55:58.704420 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) 2019-06-04T05:55:58.704422 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) 2019-06-04T05:55:58.704479 [APP/PROC/WEB/0]       at java.lang.Thread.run(Thread.java:748)   Thanks!
asked
2 answers
0

Hi Razvan,

Is your Scheduled Event creating a huge number of objects and not (properly) getting rid of them?

It’s an OutOfMemory error, specifically relating to the creation of (too) many temporary objects. So you’ll need to resolve this in your SE microflow

See this thread for more info! 

answered
0

You could also check out: Bulk Updates - Recommendations for Better Process

- Use limits and offsets in the retrieves

- Don’t commit in loops, commit lists

- Evaluate the ‘commit with/without events’ because you could trigger unneeded/unwanted logic

- Use endTransaction/startTransaction from CommunityCommons module when processing large amounts after X times of iterations (when using limits)

answered