-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Hello guys,
I encounter the following problem since a few weeks, each morning this error occurs:
Failed to write data to connection IPv4Address(('X', X)) (IPv4Address(('X', X)))
-
Neo4j version: Community 4.3.9
-
Neo4j Mode: Single instance
-
Driver version: python 3.8 - neo4j-driver 4.4.1 - flask 1.1.2 - gunicorn 20.0.4
-
Operating system: Server are hosted on Scalingo with Ubuntu 20.04
-
Steps to reproduce: Do a call to our Flask API to write in the DB.
-
Expected behavior: Call succeeds without any error
-
Actual behavior: Call succeeds but with a previous "Failed to write data" error
Additional info:
-
This error appeared after updating our Database from Neo4j 3.5.2 to Neo4j 4.3.9, and our neo4j-driver from 1.7.2 to 4.4.1
-
This errors occurs each day for the very first writing call in the database.
-
This error is currently non blocking, the connection seems simply lost and the Gunicorn app executes the code correctly after raising this error, here is an example of the logs:
`2022-04-06 10:20:36.186129103 +0200 CEST[web-1] Failed to write data to connection IPv4Address(('X', X)) (IPv4Address(('X', X)))
2022-04-06 10:20:36.183971778 +0200 CEST[web-1] 10.0.0.48 - - [06/Apr/2022:08:20:36 +0000] "POST /similarity/profile-async HTTP/1.1" 200 89 "-" "-"
2022-04-06 10:20:36.649252548 +0200 CEST[web-1] 2022-04-06 08:20:36.648783 (+ 1225.547708 sec) refresh_nb_matching_for_all_missions started!
2022-04-06 10:20:41.710179194 +0200 CEST[web-1] 2022-04-06 08:20:41.709843 (+ 5.06106 sec) refresh_nb_matching_for_all_missions done!
2022-04-06 10:20:41.711310984 +0200 CEST[web-1] Matching Profile Done`
- I already checked a few posts and contacted GrapheneDB (which hosts our Neo4j databases) and tried a few solutions:
-
Checking if there is no trouble on the GrapheneDB side
-
Closing each session at the end of each transaction in our API
-
Checking if there is no multi processing on our APP (seems to not be the case)
-
Changing the default max_connection_lifetime to 10 minutes
-
Changing the connection protocol, previous was "bolt", we currently are using "bolt+s"
I tried to be as clear as possible but don't hesitate if you need any additional info !
Thanks in advance for your help, have a nice day :)