Something happened™ that made me look at the rollup script we use in production. I turned off async workers so that this simple loop was being done on the database:
for current_dir, subdirs, files in os.walk(root):
for subdir in subdirs:
if subdir == '.ceres-tree':
continue
path = join(current_dir, subdir)
if os.listdir(path):
if exists(join(path, '.ceres-node')):
node_found(path, root, rollup_time) # calls slice.read(from, to)
nodes_found += 1
And after 1 minute or so, it error'd with:
Traceback (most recent call last):
File "<builtin>/app_main.py", line 75, in run_toplevel
File "rollup.py", line 108, in <module>
File "rollup_simple.py", line 137, in node_found
File "ceres.py", line 360, in slices
File "ceres.py", line 389, in readSlices
OSError: [Errno 24] Too many open files
Where the failed line is calling os.listdir(self.fsPath)
With these two changes, this no longer became reproducible.
Something happened™ that made me look at the rollup script we use in production. I turned off async workers so that this simple loop was being done on the database:
And after 1 minute or so, it error'd with:
Where the failed line is calling
os.listdir(self.fsPath)
With these two changes, this no longer became reproducible.