Add timeout to urllib3.PoolManager #1473
Quali-Community
started this conversation in
Idea Box
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We had a hung execution that I looked into and the most probable issue was one of two api calls. It looks like they use urllib3 without a timeout. Perhaps a way to increase system robustness is as follows.
api = CloudShellSessionContext(context)
api.GetReservationInputs(context.reservation.reservation_id) # may hang
api.GetSandboxData(reservation_id) # may hang
Maybe instead of:
self._http = urllib3.PoolManager(num_pools=connection_pool_size, ssl_context=ctx)
use this:
self._http = urllib3.PoolManager(num_pools=connection_pool_size, ssl_context=ctx, timeout=300.0)
William Dirschka (William.Dirschka27) - 09/13/2022 06:58 PM
· 5661 ·
Beta Was this translation helpful? Give feedback.
All reactions