Team Calendar and Heap Memory Outage
Asked by etx:

Greetings,

Recently we got random error where with the team calendar and confluence hangs every 1-2 hours, which is totally unusable.

The calendar id (subCalendarId=xxxx) is different every time hence we don't think it's about data corruption of a specific calendar.
> org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-3" (id=205) has been active for 66,801 milliseconds (since 6/7/18 1:03 PM) to serve the same request for [/rest/calendar-services/1.0/calendar/events.js](http://conf.entinux.co.jp/rest/calendar-services/1.0/calendar/events.json?subCalendarId=ef9d4cb4-2824-46d5-bfac-17b4dfbcae4f&userTimeZoneId=UTC&start=2018-05-08T00%3A00%3A00Z&end=2018-07-08T00%3A00%3A00Z&_=1528376613717 "http://conf.entinux.co.jp/rest/calendar-services/1.0/calendar/events.js")[on?subCalendarId=ef9d4cb4-2824-46d5-bfac-17b4dfbcae4f\&userTimeZoneId=UTC\&start=2018-05-08T00%3A00%3A00Z\&end=2018-07-08T00%3A00%3A00Z\&_=1528376613717](http://conf.entinux.co.jp/rest/calendar-services/1.0/calendar/events.json?subCalendarId=ef9d4cb4-2824-46d5-bfac-17b4dfbcae4f&userTimeZoneId=UTC&start=2018-05-08T00%3A00%3A00Z&end=2018-07-08T00%3A00%3A00Z&_=1528376613717 "on?subCalendarId=ef9d4cb4-2824-46d5-bfac-17b4dfbcae4f&userTimeZoneId=UTC&start=2018-05-08T00%3A00%3A00Z&end=2018-07-08T00%3A00%3A00Z&_=1528376613717") and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 2 thread(s) in total that are monitored by this Valve and may be stuck. java.lang.Throwable

After a few times, the following error occurs and the whole confluence went down.

We have already increased the heap size from 2GB to 8GB which doesn't help.

Thanks.
> Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "C3P0PooledConnectionPoolManager\[identityToken-\>319iuf9v1og22t1ghyd3k\|76c4ebbf\]-HelperThread-#0"Exception in thread "pool-1-thread-1-Logging Task Scheduler" java.lang.OutOfMemoryError: Java heap spaceException in thread "ContainerBackgroundProcessor\[StandardEngine\[Standalone\]\]" 07-Jun-2018 11:16:08.029 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin \[SetPropertiesRule\]{Server} Setting property 'debug' to '0' did not find a matching property.


Answers:
author: AnnWorley
body: If you are still getting out of memory errors after raising the heap we should take a closer look at your logs and configuration files. I opened a ticket for you on our support portal, and sent you a request for a support zip to be attached to it.

We can circle back to this thread once we have a resolution to share.

comments: author: Parthiban Subramaniam
body: [@AnnWorley](/t5/user/viewprofilepage/user-id/502040) Was there any resolution to this issue?

We are facing something similar.


author: AnnWorley
body: Hi - the support ticket is still open but one thing I can share from it is that there is an open bug report, with diagnosis and workaround that may fit your case: [Deleting repeating Events in Team Calendar causes duplicates in database and java.lang.OutOfMemoryError](https://jira.atlassian.com/browse/CONFSERVER-55506)