Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Healenium environment is down after throwing the out of memory exception #91

Open
gopekanna opened this issue Sep 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@gopekanna
Copy link

Describe the bug

Healenium setup is automatically getting down after throwing the below exception

Please let me know the solution to maintain the health status without any exception.

2024-09-10 11:28:01.970 INFO 1 - [878-exec-27] healenium : [Save Elements] Request: By.xpath(//span[text()='Reports'])
Exception in thread "http-nio-7878-Acceptor" java.lang.OutOfMemoryError: Java heap space
2024-09-10 11:28:09.980 ERROR 1 - [7878-exec-2] o.a.c.http11.Http11NioProtocol : Failed to complete processing of a request java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:03.453 ERROR 1 - [7878-exec-5] .c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] threw exception java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.692 ERROR 1 - [878-exec-28] o.a.c.http11.Http11NioProtocol : Failed to complete processing of a request java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.693 ERROR 1 - [7878-exec-5] o.a.c.c.C.[Tomcat].[localhost] : Exception Processing [ErrorPage[errorCode=0, location=/error]] jakarta.servlet.ServletException: Handler dispatch failed: java.lang.OutOfMemoryError: Java heap space\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1104)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)\n at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)\n at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:642)\n at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:410)\n at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:340)\n at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:277)\n at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:362)\n at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:222)\n at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:308)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:149)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:735)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n at java.base/java.lang.Thread.run(Thread.java:840)\n Caused by: java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.716 ERROR 1 - [7878-exec-8] .c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space] with root cause java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.719 ERROR 1 - [7878-exec-5] o.a.c.http11.Http11Processor : Error processing request java.lang.NullPointerException: Cannot read the array length because "src" is null\n at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:228)\n at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:420)\n at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:406)\n at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:368)\n at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1049)\n at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:377)\n at org.apache.coyote.Response.action(Response.java:210)\n at org.apache.coyote.Response.sendHeaders(Response.java:447)\n at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:287)\n at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:246)\n at org.apache.catalina.connector.Response.finishResponse(Response.java:416)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:373)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n at java.base/java.lang.Thread.run(Thread.java:840)\n
2024-09-10 11:28:17.721 ERROR 1 - [7878-exec-5] o.a.c.http11.Http11Processor : Error finishing response java.lang.NullPointerException: Cannot read the array length because "src" is null\n at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:228)\n at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:420)\n at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:406)\n at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:368)\n at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1049)\n at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:377)\n at org.apache.coyote.http11.Http11Processor.endRequest(Http11Processor.java:1204)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:431)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n at java.base/java.lang.Thread.run(Thread.java:840)\n
2024-09-10 11:28:17.737 WARN 1 - [878-exec-18] o.h.e.j.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 53200
2024-09-10 11:28:17.737 ERROR 1 - [878-exec-18] o.h.e.j.spi.SqlExceptionHelper : Ran out of memory retrieving query results.
2024-09-10 11:28:17.739 ERROR 1 - [878-exec-18] .c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.orm.jpa.JpaSystemException: JDBC exception executing SQL [select r1_0.uid,r1_0.create_date,r1_0.elements from report r1_0 order by r1_0.create_date desc] [Ran out of memory retrieving query results.] [n/a]] with root cause java.lang.OutOfMemoryError: Java heap space\n

How to reproduce the issue

Healenium environment is getting down after throwing the below exception. Self-healing is working as expected after restart the kube but after sometime, automatically the environment is getting down.

Logs appeared during using Healenium

2024-09-10 11:28:01.970  INFO 1 - [878-exec-27] healenium                        : [Save Elements] Request: By.xpath(//span[text()='Reports'])
Exception in thread "http-nio-7878-Acceptor" java.lang.OutOfMemoryError: Java heap space
2024-09-10 11:28:09.980 ERROR 1 - [7878-exec-2] o.a.c.http11.Http11NioProtocol   : Failed to complete processing of a request java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:03.453 ERROR 1 - [7878-exec-5] .c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] threw exception java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.692 ERROR 1 - [878-exec-28] o.a.c.http11.Http11NioProtocol   : Failed to complete processing of a request java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.693 ERROR 1 - [7878-exec-5] o.a.c.c.C.[Tomcat].[localhost]   : Exception Processing [ErrorPage[errorCode=0, location=/error]] jakarta.servlet.ServletException: Handler dispatch failed: java.lang.OutOfMemoryError: Java heap space\n 	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1104)\n 	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)\n 	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)\n 	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)\n 	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)\n 	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)\n at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)\n 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)\n 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n 	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)\n 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\n 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\n 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:642)\n 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:410)\n 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:340)\n 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:277)\n 	at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:362)\n 	at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:222)\n 	at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:308)\n 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:149)\n 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)\n 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\n 	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:735)\n 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)\n 	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)\n 	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)\n 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)\n 	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n 	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n 	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n 	at java.base/java.lang.Thread.run(Thread.java:840)\n Caused by: java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.716 ERROR 1 - [7878-exec-8] .c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space] with root cause java.lang.OutOfMemoryError: Java heap space\n
2024-09-10 11:28:17.719 ERROR 1 - [7878-exec-5] o.a.c.http11.Http11Processor     : Error processing request java.lang.NullPointerException: Cannot read the array length because "src" is null\n 	at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:228)\n 	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:420)\n 	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:406)\n 	at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:368)\n 	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1049)\n 	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:377)\n 	at org.apache.coyote.Response.action(Response.java:210)\n 	at org.apache.coyote.Response.sendHeaders(Response.java:447)\n 	at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:287)\n 	at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:246)\n 	at org.apache.catalina.connector.Response.finishResponse(Response.java:416)\n 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:373)\n 	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)\n 	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)\n 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)\n 	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n 	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n 	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n 	at java.base/java.lang.Thread.run(Thread.java:840)\n
2024-09-10 11:28:17.721 ERROR 1 - [7878-exec-5] o.a.c.http11.Http11Processor     : Error finishing response java.lang.NullPointerException: Cannot read the array length because "src" is null\n 	at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:228)\n 	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:420)\n 	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:406)\n 	at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:368)\n 	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1049)\n 	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:377)\n 	at org.apache.coyote.http11.Http11Processor.endRequest(Http11Processor.java:1204)\n 	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:431)\n 	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)\n 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)\n 	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n 	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n 	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n 	at java.base/java.lang.Thread.run(Thread.java:840)\n
2024-09-10 11:28:17.737  WARN 1 - [878-exec-18] o.h.e.j.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 53200
2024-09-10 11:28:17.737 ERROR 1 - [878-exec-18] o.h.e.j.spi.SqlExceptionHelper   : Ran out of memory retrieving query results.
2024-09-10 11:28:17.739 ERROR 1 - [878-exec-18] .c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.orm.jpa.JpaSystemException: JDBC exception executing SQL [select r1_0.uid,r1_0.create_date,r1_0.elements from report r1_0 order by r1_0.create_date desc] [Ran out of memory retrieving query results.] [n/a]] with root cause java.lang.OutOfMemoryError: Java heap space\n

Expected behavior

No response

Actual behavior

No response

Healenium Web version

3.4.6

Healenium Backend version

3.4.5

Selenium version

4.6.0

Platform

Java

Additional context

hlm-selector-imitator version is 1.4

@gopekanna gopekanna added the bug Something isn't working label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants