py2neo icon indicating copy to clipboard operation
py2neo copied to clipboard

Failed to read message exception

Open ErangaD opened this issue 2 years ago • 2 comments

I use the latest py2neo version and in the server logs I can see this error message keeps appearing (not always). It affects the users of the application sometimes. Failed to read message

I tried to debug the issue. I am using bolt connection inside an azure app service. This happens when the graph.run(query).data() is executed and after few minutes (usually 3 - 4 minutes) this throws the 'Failed to read message' exception. It seems this is thrown inside the Wire read. Screenshot 2022-12-10 at 14 30 18 I have seen a similar issue reported here #844 Any solution or workaround is highly appreciated.

ErangaD avatar Dec 10 '22 09:12 ErangaD

I also see this in Neo4j server debug logs.

Screenshot 2022-12-12 at 09 40 29

ErangaD avatar Dec 12 '22 04:12 ErangaD

As a workaround, I was able to resolve this issue by executing a dummy query once a minute. It is not the best solution but it works. I think what happens is the database connection gets abandoned after some time if the connection is not used for a while. And that connection is used even though it is closed which leads to this error. I guess if this library can address this issue, it would be great.

ErangaD avatar Dec 17 '22 12:12 ErangaD