mzechmeister / serval

calculate radial velocities from stellar spectra
MIT License
36 stars 9 forks source link

mmap.error: [Errno 24] Too many open files #32

Closed mzechmeister closed 4 years ago

mzechmeister commented 4 years ago

This occurs when processing several hundred spectra (~700). The limit for open files is (ulimit -a) open files (-n) 1024

mzechmeister commented 4 years ago

As a quick work-around one can temporarily increase the limit with prlimit (http://man7.org/linux/man-pages/man1/prlimit.1.html).

First, one can find the pid with

ps aux | grep serval

Having the pid, one can re-check the current limits while the program is running: prlimit --pid 7877 NOFILE max number of open files 1024 4096 files

Then one can change the limit for number of open files with prlimit --pid 7877 --nofile=4095:4095

mzechmeister commented 4 years ago

Yet, it is unclear why serval could process previously a similar amount.

And why are much more files open then processed spectra? Maybe files are not properly closed and reopened.