Too many open files in python

后端 未结 3 1277
离开以前
离开以前 2020-12-05 23:52

I wrote kind of a test suite which is heavily file intensive. After some time (2h) I get an IOError: [Errno 24] Too many open files: \'/tmp/tmpxsqYPm\'. I doubl

3条回答
  •  再見小時候
    2020-12-06 00:16

    resource.RLIMIT_NOFILE is indeed 7, but that's an index into resource.getrlimit(), not the limit itself... resource.getrlimit(resource.RLIMIT_NOFILE) is what you want your top range() to be

提交回复
热议问题