While add any data in maintenance tab facing the Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread error

while adding any data in the maintenance tab or data entry tab facing this below error in tomcat.

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “activemq-failure-check-thread”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “AsyncFileHandlerWriter-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-2 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-1 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-22”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “http-nio-8080-AsyncTimeout”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “http-nio-8080-Poller”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-23”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-4”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-2”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-0 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-9”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “http-nio-8080-exec-10”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “ContainerBackgroundProcessor[StandardEngine[Catalina]]”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-4 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#0-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-8”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-0 (-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-24”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-15”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-3 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-2”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-4”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-12”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-25”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#1-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-10”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-4”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-14”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-2”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-16”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-13”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-17”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-19”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-11”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#2-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-10 (org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnector)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-2”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-7”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “http-nio-8080-exec-6”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-18”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-6”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-21”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-4”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-20”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Statistics Thread-Hibernate 9214cf09-0ae4-4fc3-8e9b-c4edabf72672-1”

Note: JAVA_OPT environment value is “-Xms2048m -Xmx4096m -XX:PermSize=1024m -XX:MaxPermSize=1024m”

Welcome to the community @kandarpjoshi!

Thank you for posting, and thanks a lot for your patience!

Right before the error appears, could you open the Network tab in your browser’s DevTools (F12) and then reproduce the error. Please do you see any errors in the Network tab? Could you share a screenshot?

Additionally, maybe the full Catalina.out log (without sensitive info) could help a lot.

Thanks!

Sure, I can share.
Here I am adding new Organization unit from below link,

http://localhost:8080/dhis2s/dhis-web-maintenance/index.html#/edit/organisationUnitSection/organisationUnit/add

And getting below error. Mainly “Java heap space” and “java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread”

FYI, I am running DHIS2 in the windows system.

Tomcat log:

  • INFO 2022-12-20T11:56:26,992 (admin) Import:Start (DefaultMetadataImportService.java [http-nio-8080-exec-8]) IDRKeMqu4F2ByNSqUDuDbtGmLhg05UaOTW0VtBoR13LPU=

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “activemq-failure-check-thread”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “http-nio-8080-AsyncTimeout”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-2 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-9”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “http-nio-8080-Poller”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-1 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#1-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-0 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-10”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-15”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#2-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-4”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “ContainerBackgroundProcessor[StandardEngine[Catalina]]”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-18”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-3 (ActiveMQ-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-0 (-scheduled-threads)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-4 (ActiveMQ-scheduled-threads)”
Exception in thread “org.springframework.jms.JmsListenerEndpointContainer#4-2” Exception in thread “taskScheduler-14” Exception in thread “org.springframework.jms.JmsListenerEndpointContainer#3-2” Exception in thread “org.springframework.jms.JmsListenerEndpointContainer#0-1” Exception in thread “org.springframework.jms.JmsListenerEndpointContainer#3-4” Exception in thread “org.springframework.jms.JmsListenerEndpointContainer#5-2” java.lang.OutOfMemoryError: Java heap space
Exception in thread “taskScheduler-22” java.lang.OutOfMemoryError: Java heap space
20-Dec-2022 11:57:26.479 SEVERE [http-nio-8080-exec-8] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Failed to complete processing of a request
java.lang.OutOfMemoryError: Java heap space
Exception in thread “org.springframework.jms.JmsListenerEndpointContainer#3-5” Exception in thread “taskScheduler-13” java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-5”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-4”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#5-6”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#4-4”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-22”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-7”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “org.springframework.jms.JmsListenerEndpointContainer#3-6”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-11”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-7”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-3”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-6”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-24”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-20”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-17”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Statistics Thread-Hibernate c8248576-781c-4bd0-95ce-0a2a53f3b993-1”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-12”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-21”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-16”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-2”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-23”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-8”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-19”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-25”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-26”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “taskScheduler-27”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-21 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@4611af03)”

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “Thread-18 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@4611af03)”

Network Tab (F12)

Hi @kandarpjoshi

Thanks for sharing!

But this same user was able to add new organization units? Or is this the first time this user account attempts to create an OU? (If there were OUs added by the same user before then we are sure it’s not a configuration issue.)







Please check out these recommendations from @bobj in a similar post: