-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexceptionally long timeout #633
Comments
The retry handler is here: https://github.com/fsspec/gcsfs/blob/main/gcsfs/retry.py#L125 The Would welcome a PR to add to the documentation. |
I might misunderstand what you're saying, but I did try passing the By default, I see that >>> import random
>>> sum(random.random() + 2 ** (retry - 1) for retry in range (1, 6))
32.684668857397504 |
32s would be the additional wait time between attempted connection, so it still depends on how long it takes for each attempt to time out, which I think might be 300s. Can you please confirm: after using
Also, I see you are using uvloop - does it have its own configuration too maybe? |
In my app, I'd like to timeout after a certain amount of seconds if my bucket cannot be reached, and fall back on a local copy of my file.
This is useful on deployments where egress to external sites is heavily firewalled.
However, passing in all the timeout information I could find by looking at the doc (notably
GCSFileSystem.session_kwargs
), andGCSFileSystem.timeout
(even though it's not documented), does not solve the problem.It hangs for a few minutes before throwing an exception.
I think the timeout is not passed everywhere it should, especially in
GCSFile
.But modifying the code of
GCSFile
to accept a timeout as argument did not work either.It hangs on this line especially:
gcsfs/gcsfs/core.py
Line 1785 in 5cb4479
It runs in a asyncio loop, which know next to nothing about, so I can't dig.
The traceback is below, to reproduce, simply add an unroutable IP to
/etc/hosts
, and run the code snippet.To reproduce
Traceback
The text was updated successfully, but these errors were encountered: