Replies: 2 comments 15 replies
-
This messages:
indicate that the server is not sending PINGs at the expected interval. The most common reason why this happens is that you are blocking the async loop for too long, so the server task that sends these pings does not get a chance to run. Possible? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I got caught up with work. I did in fact have a synchronous method which should be async, but I wouldn't expect that to be the issue because the total running time of it was pretty minute, and the disconnection happend while the server was idle (only pings and pongs). I have made the corresponding changes and will report back if the error persists. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a simple raspberry pi hosting a dockerized fastapi really simple server to which only one client connects. This other client is itself a fastapi app. Every so often, the connection drops. Upon inspecting the logs generated by running both client and server with engineio_logs=True, it would appear that while the socketio part goes down, the underlying engineio websocket is still alive and sending pings and pongs back and forth. The problem is that this becomes the perpetual state of the connection, no reconnects are attempted.
When trying to emit from the client to the server, I get "/" is not a connected namespace.
During the re-connection procedure, at some point the server sends "Unable to connect". I've somewhat tried to trace back the error, and it appears that when the server is handling the new connection attempt, sid is None. This can be due to some weird namespace issue, which would be strange because I haven't touched anything and I'm using the default one, or the manager is returning None on this bit
as if the client was already connected.
These are the log extracts from the client:
Happy to provide any more context or anything useful.
As a side note, I don't know if this is relevant, but I increased the ping_interval and ping_timeout to around 60s each and this was mitigated, although it does continue to happen.
Beta Was this translation helpful? Give feedback.
All reactions