Skip to content
Advertisement

Subprocess – Too many open Files in subprocess

On my system(using python3.6.9) I got the Too many open Files Error.

I got the error while executing a subprocess in python.

Traceback:

JavaScript

I tried to look it up but permanently setting the ulimit didn’t work.

I even build a function, that sets the ulimit before executing a subprocess.

JavaScript

Advertisement

Answer

I didn’t find the right solution on the Internet.

The solution for me was to edit the fs.file max (/proc/sys/fs/file-max)

I put the value in the file on 1000000.

and to edit the bash.bashrc file to increase the ulimit in every session opened.

/etc/bash.bashrc

There i added:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement