How to handle ServerDisconnectedError gracefully ? #7094
Unanswered
erikseulean
asked this question in
Q&A
Replies: 1 comment 4 replies
-
The exception should relate to only 1 call. "reconnect" just means retry the If you just want to ensure you get the results of the other tasks which didn't error, then use |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Code:
Now the entity_finder function can raise
ServerDisconnectedError
for example if there are way too many open connections or on a time based. keep_alive I don't think it would work in this case.One solution is create a session for each entity and in case the exception happens, wait and retry, however this would create a lot of
ClientSessions
which is not ideal.Is there another way to reconnect ? The API doesn't seem to provide anything as such.
Beta Was this translation helpful? Give feedback.
All reactions