-
Notifications
You must be signed in to change notification settings - Fork 155
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
Application hang after Neo4j connection did not respond #1504
Comments
@pattanmzy, thanks for your message. Could you let us know if you are using reactive API by any chance please? |
Thanks @injectives for your reply. The application does not use reactive API but it has dependency on Spring Boot Actuator for monitoring purpose. From the thread dumps, I can see that the Actuator HealthEndpoint uses the ReactiveHealthContributors to perform health check. There were many similar threads hanging waiting for response from Actuator health check. Is this the cause of the problem? Extracted from thread dump |
If I remember correctly, the healthcheck uses the driver session
I suggest trying the latest driver version 5.14.0 as 5.11.0 introduced the cancellation support, see the release notes. |
Thanks for the feedback. I have updated the application to use the latest driver version. I will continue to monitor the application and will provide an update here if the problem still persist. |
Hi @injectives , The connection issue happened again a few days after I upgraded the Neo4j Java driver to the latest version, i.e. 5.14.0. From the attached thread dumps that were generated at 30s to 1 min intervals, we observed that there were application initiated queries to Neo4j AuraDB queries as well as Actuator health check threads hang and did not respond. There were errors such as connection to the database terminated, connection read timed out, server is no longer available, failed to obtain connection towards WRITE server, etc. found in the application logs. Please find the details in the application and trace logs attached. Spring Boot starter version: 3.0.12 Thread dumps Logs Could you please look into this? Thank you. |
Hello. Sure. The thread dumps show the http threads are in The The driver debug logs might reveal more context on this issue. Would you be happy to enable and supply those please? The driver logging can be configured though the following config option. As a side question, could you let me know if you set the target database explicitly in the driver session please? See the following config option for more details. If possible, it would be better to set this to narrow down the issue search area a little bit. And one more general question please. Has your application been using Aura for a while before the issue started happening on a certain date or is it a new deployment? I am just trying to understand if this issue just started happening on a certain date, which could mean some server change. Thank you. |
I have set the logging level to debug. I will provide the logs when the issue happens again.
The target database was not set previously. It's now set.
It is a new deployment of less than 2 months. This issue started happening since the beginning. |
Hi @injectives , The issue happened again on December 26th. The thread dumps show similar issue as before. There's no error found in the application logs. However, there were warning messages on Actuator Health contributor taking long time to respond in the console log as below. There were also no application activity related log messages after this time. It appears that the issue started to happen around this time.
The driver debug logs are attached. Thread dumps Driver Debug Log Console log Appreciate if you could take a look at it. Thank you. |
@pattanmzy, thanks a lot for providing the vital details. We will review soon and will get back to you. |
After view the neo4j.log.zip,i have found the same issue in my application.The application is running in AWS. |
Hi,
I have a Spring Boot application with Neo4j AuraDB. The application was working fine initially. However, occasionally we observed that queries to the Neo4j AuraDB hang and did not respond after a long period of time, e.g. 10 - 20 minutes. When this happened, we saw the following message in the logs.
[Neo4jDriverIO-2-1] - Closing connection pool towards p-4dc8adc8-7ed2-7.production-orch-0361.neo4j.io:7687, it has no active connections and is not in the routing table registry.
We generated a few thread dumps every 30s. We observed that those threads still hang and the number of threads waiting for response from neo4j connection kept piling up.
There are no other related errors in the log.
Connection uri: neo4j+s://.databases.neo4j.io
Spring Boot starter version: 3.0.8
Spring Data Neo4j version: 7.0.7
Neo4j java driver version: 5.9.0
Neo4j version: 5
Neo4j Aura Professional on AWS
Operating System: Alpine Linux v3.18 on Kubernetes EKS
Java version: openjdk version "17.0.9"
Expected behavior
Database query should execute successfully
Actual behavior
Connection to AuraDB did not respond causing thread to hang.
Thread dumps
ThreadDumps.zip
Could you please advise what could be the root cause of this issue.
Do let me know if you need more info.
Thank you.
The text was updated successfully, but these errors were encountered: