Google AppEngine Python OSError "too many files open" at launch

368 views Asked by At

I'm using ubuntu 13.10 running in a VM on OSX, python2.7 and GAE 1.8.8.

Lauching dev_appserver.py results in the following error:

INFO     2013-12-10 03:53:30,046 api_server.py:527] Saving search indexes
Traceback (most recent call last):
  File "/home/ubuntu/xxxxxx/google_appengine/dev_appserver.py", line 197, in <module>
  File "/home/ubuntu/xxxxxx/google_appengine/dev_appserver.py", line 193, in _run_file
  File "/home/ubuntu/xxxxxx/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 872, in <module>
  File "/home/ubuntu/xxxxxx/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 868, in main
  File "/home/ubuntu/xxxxxx/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 707, in stop
  File "/home/ubuntu/xxxxxx/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 141, in quit
  File "/home/ubuntu/xxxxxx/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 528, in cleanup_stubs
  File "/home/ubuntu/xxxxxx/google_appengine/google/appengine/api/search/simple_search_stub.py", line 984, in Write
  File "/usr/lib/python2.7/tempfile.py", line 304, in mkstemp
  File "/usr/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
OSError: [Errno 24] Too many open files: '/tmp/appengine.xxxxxx-hr-dev.ubuntu/tmpMVVXrH'

Any ideas?

1

There are 1 answers

0
Prahlad Yeri On BEST ANSWER

Check the shared memory parameter, kern.sysv.shmseg on your linux system and set it right by increasing it.

To view the shared memory parameters, use:

sysctl -A | grep shm

To update that parameters, edit file:

sudo nano /etc/sysctl.conf

Refer to this SO answer for more information.