-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
FileNotFoundError when accessing same file from multiple processes #8411
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
Comments
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! |
Note that as far as I'm aware That said, we might be able to improve the error message. |
Thanks for your reply keewis. |
Assuming they're actually different processes, I can't see what would be causing this on the xarray side — there shouldn't be any shared resources between different processes reading files. An MCVE is somewhat necessary here to understand exactly what's happening. |
Does it matter that multiple processes are running on the same server? Once we moved jobs to different servers, they the issue disappeared. |
Are they in different processes or the same process in different threads? MCVE please! |
I use airflow, I created 5 separate jobs on same server. They all run at the same time. I do not create threads anywhere. SO they are in different processes right? |
I'm not sure how airflow works there... I think to make progress here, we'd need a minimal example that reproduces the problem outside of airflow... |
Closing as no MCVE, feel free to reopen with one |
What is your issue?
I am trying to access the same file using xr.load_dataset() from multiple processes. They are all trying to read it at the same time (or within 0.1s of each other). But only the 1st process is able to access it, while the other processes are not able to read it. It gives a generic "FileNotFoundError" even though the file is there. The file is written about 2-3s before it is read by different processes. Is this expencted? Earlier I suspected xr.open_dataset() to be the culprit but removing that with load_dataset() also did not solve the issue.
The issue is sporadic and cannot be reproduced easily but it happens in our production process. Any suggestions please?
The text was updated successfully, but these errors were encountered: