Executing "serverless package" command I'm having this error:
`Serverless: Removing Python requirements helper...
Serverless: Installing required Python packages for runtime python2.7...
Serverless: Zipping required Python packages...
events.js:160
throw er; // Unhandled 'error' event
^
Error: EMFILE: too many open files, open '/synced_data/kuona_lambda/promo-simulations-level/.requirements/numpy/core/tests/test_arrayprint.pyc'
at Error (native)`
This is what I'm using:
CentOS-7
python2.7
Node v6.10.3
serverless v1.16.0
I did a count file in the .requierements folder (find .requirements -type f | wc -l) and this is the result: 9202
Is there something I am missing?, how can I fix this?
Hmm. You're the first to encounter this error AFAIK. Would you mind sharing your requirements.txt file?
Sure. This is my requirements.txt
Django==1.8.2
psycopg2==2.4.5
simplejson==3.3.1
urllib3==1.7.1
django-reversion==1.8.7
django-json-field==0.5.7
pytz==2015.6
numpy==1.12.1
Pillow==2.9.0
pandas==0.19.2
sklearn==0.0
scipy==0.15.1
patsy==0.4.1
Hey @gutyril, sorry I wasn't able to reproduce this (tho I'm not quite matching your setup, I'm on Ubuntu). I get the same result from find .requirements -type f | wc -l too tho. :confounded:
I doubt it's much help to you at this stage, but when I encountered this I had gone from dockerizePip: false to dockerizePip: true and fixed it by deleting my .requirements.
Hi @gutyril, that happened to me (on OSX) and I did what's on this stackoverflow guide.
TL;DR -
$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -w kern.maxfiles=65536
$ sudo sysctl -w kern.maxfilesperproc=65536
$ ulimit -n 65536
Most helpful comment
Hi @gutyril, that happened to me (on OSX) and I did what's on this stackoverflow guide.
TL;DR -