Reproduce:
Run nodejs app.js and watch lsof -p <PID of app.js> | wc -l increase with every gallery refresh. When the number of open file descriptors exceeds ulimit -n, app.js will stop working with, e.g.
{"message":"File not found","error":null}
{"message":"File not found","error":{"errno":20,"code":"EMFILE","path":"resources/photos/studio-2015/IMG_7795.JPG"}}
{"message":"No album found","error":{"errno":20,"code":"EMFILE","path":"./resources/photos/studio-2015"}}
Reproduce:
Run
nodejs app.jsand watchlsof -p <PID of app.js> | wc -lincrease with every gallery refresh. When the number of open file descriptors exceedsulimit -n, app.js will stop working with, e.g.