Problem :
Tomcat periodically encounters Java heap space OOM error and the Confluence web page is down.
Error Log :
java.lang.OutOfMemoryError: Java heap space
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception in thread "AsyncFileHandlerWriter-1259475182" java.lang.OutOfMemoryError: Java heap space
Exception in thread "C3P0PooledConnectionPoolManager[identityToken->z8kfltaa19zvp6e1xi04fp|796573de]-AdminTaskTimer" java.lang.OutOfMemoryError: Java heap space
Exception in thread "I/O dispatcher 3" java.lang.OutOfMemoryError: Java heap space
We did :
Location: /opt/atlassian/wiki/bin
File name: setenv.sh
2.1 Changed from Xmx1024m to Xmx2048m
CATALINA_OPTS="-Xms1024m -Xmx2048m -XX:+UseG1GC ${CATALINA_OPTS}"
2.2 Option to create dump when OOM occurs later
export CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+HeapDumpOnOutOfMemoryError"
export CATALINA_OPTS=" ${CATALINA_OPTS} -XX:HeapDumpPath=/test2/was/apache-tomcat-9.0.12/logs/hdump"
Result :
The server started well, so the wiki page was well connected.
But When editing and copying pages, etc., it becomes infinitely loaded, and an error occurred that could not be retrieved.
Please let us know how we should solve this problem.