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
fix(process-files): quit Python interpreter after every batch to prevent "too many open files" error (DEV-2268) #402
Conversation
DEV-2268 DSP-TOOLS: process-files errors: Too many open files
DescriptionOn Vij's machine, the After these 25'000 TIF errors, some dozens The The 4 log files of 5 MB size each were not enough, they quickly were filled and overwritten. Every second ca. 1 MB of log entries are logged (!) AnalysisA similar case on SO (https://stackoverflow.com/questions/40158725/40158989#40158989) leads me to the conclusion that too many files/sockets are open at the same time. Open files/sockets could be:
I assume the culprit is no. 2. Possible solutionsReduce number of threadsDifficult to achieve. It would perhaps be possible to read the system's Catch OSError, retry until it worksI could try-catch the OSError, and retry until it works, for the cases that are under my control (i.e. copy orig file, socket, write sidecar file). Steps to do
Terminal output
~25'000 lines later (all the same: couldn't create .tif.orig file)
(all the same it continues with couldn't create .tif.orig, until line ~33'800)
This last block is repeated some dozens of times, almost identically, until line ~35'600. Then, some thousands of |
resolves DEV-2268