-
Notifications
You must be signed in to change notification settings - Fork 36
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
OSError: [Errno 24] Too many open files #94
Comments
I don't immediately know the reason, but if this is running on macOS, the files-open limit is pretty low by default. You can do something like |
@Eisbrenner - could you please try running the same code on intake-xarray master? |
@martindurant i've seen the work around via increased ulimit; however, I think the behavior was changed directly in xarray and the limit should not be breached anymore. I thought it will be beneficial to intake to be aware of this too, thus I thought i'd share this regardless. @scottyhq |
with version |
Is the error happening during a compute(), or while creating the xarray object? |
while creating the object; this (below) is all I'm doing, maybe there is something in the few lines of code which I'm not aware of what it does. I'm still trying to get my head around some of this, for example Dask in general.
the error occurs from this command. |
Can you please compare |
I'll quickly check what the output is with a small enough set of files. EDIT:
here |
In if self._can_be_local:
url = fsspec.open_local(self.urlpath, **self.storage_options)
else:
# https://github.com/intake/filesystem_spec/issues/476#issuecomment-732372918
url = fsspec.open(self.urlpath, **self.storage_options).open() and local files are held open. Perhaps it would make sense to explicitly check for URLs that are already local, and pass them straight to xarray and let if do the opening of things in that case. |
Using Intake (intake-xarray) on a larger number of files, e.g. daily data for one or two decades, results in a too-many-files error.
Loading the same set of data with
xarray.open_mfdatasets
works just fine.Versions:
For me, the total number of files was:
9464
The Intake catalog I have looks something like this:
then, using
throws an error of the form of
loading the same data with
works just fine.
The text was updated successfully, but these errors were encountered: