Skip to content

Instantly share code, notes, and snippets.

@GrahamDumpleton
Created January 21, 2013 22:51
Show Gist options
  • Save GrahamDumpleton/4590267 to your computer and use it in GitHub Desktop.
Save GrahamDumpleton/4590267 to your computer and use it in GitHub Desktop.
Gunicorn crashing on closing file descriptors.
Traceback (most recent call last):
File "test-env/bin/gunicorn", line 8, in <module>
load_entry_point('gunicorn==0.16.1', 'console_scripts', 'gunicorn')()
File "/Users/graham/Work/python_agent-1.10.X/test-env/lib/python2.6/site-packages/gunicorn/app/wsgiapp.py", line 32, in run
WSGIApplication("%prog [OPTIONS] APP_MODULE").run()
File "/Users/graham/Work/python_agent-1.10.X/test-env/lib/python2.6/site-packages/gunicorn/app/base.py", line 127, in run
Arbiter(self).run()
File "/Users/graham/Work/python_agent-1.10.X/test-env/lib/python2.6/site-packages/gunicorn/arbiter.py", line 162, in run
self.start()
File "/Users/graham/Work/python_agent-1.10.X/test-env/lib/python2.6/site-packages/gunicorn/arbiter.py", line 122, in start
self.init_signals()
File "/Users/graham/Work/python_agent-1.10.X/test-env/lib/python2.6/site-packages/gunicorn/arbiter.py", line 149, in init_signals
self.log.close_on_exec()
File "/Users/graham/Work/python_agent-1.10.X/test-env/lib/python2.6/site-packages/gunicorn/glogging.py", line 275, in close_on_exec
util.close_on_exec(handler.stream.fileno())
File "/Users/graham/Work/python_agent-1.10.X/test-env/lib/python2.6/site-packages/gunicorn/util.py", line 201, in close_on_exec
flags = fcntl.fcntl(fd, fcntl.F_GETFD)
IOError: [Errno 9] Bad file descriptor
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 1473, in shutdown
h.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 800, in close
self.stream.close()
IOError: [Errno 9] Bad file descriptor
Error in sys.exitfunc:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 1473, in shutdown
h.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py", line 800, in close
self.stream.close()
IOError: [Errno 9] Bad file descriptor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment