-
Notifications
You must be signed in to change notification settings - Fork 263
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
Timeout of Dataset constructor #684
Comments
This might be possible using the signals module (https://docs.python.org/3/library/signal.html#example). If anyone wants to tackle this, a pull request would be welcome. |
I think this can be done now by setting the TIMEOUT variable in the .daprc file that the C library uses. |
You are right, it helps to add e.g. This is an ok solution, although it would still be nice to be able to control it explicitly through Python. |
Same problem here, I had some cases when some scripts got frozen following some gateway problems on a server. Do you think that it would be possible to make this into a 'native' feature of the |
The C API (which the python interface uses) does not provide an explicit way to set the timeout. |
Ok. That is a bit sad, but guess not much to be done there from Python then. Do you think it may be possible to try something else as a workaround, for example, checking for a valid ping in the case of an url, or something like that? Could that help for the cases when the server may be completely down? |
Perhaps a Dataset wrapper or subclass could be created for working with remote OpenDAP datasets, with additional features like this. A PR would be welcome. |
For our operational service it would be useful with possibility to specify a timeout on calling netcdf4.Dataset on remote datasets (Thredds/OPeNDAP), e.g.:
The text was updated successfully, but these errors were encountered: