Opened 9 years ago

Closed 8 years ago

#12046 closed (invalid)

fastcgi dies under heavy load

Reported by: acoder Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Using Django with fastcgi and nginx, Django often dies because it can't create new threads. I am using maxchildren=512 and daemonize=true. I am using blocking operations (such as http GET) in my views, so a request can take a while to finish.

Traceback (most recent call last):
  File "./", line 11, in <module>
  File "/var/lib/python-support/python2.6/django/core/management/", line 340, in execute_manager
  File "/var/lib/python-support/python2.6/django/core/management/", line 295, in execute
  File "/var/lib/python-support/python2.6/django/core/management/", line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/lib/python-support/python2.6/django/core/management/", line 219, in execute
    output = self.handle(*args, **options)
  File "/var/lib/python-support/python2.6/django/core/management/commands/", line 16, in handle
  File "/var/lib/python-support/python2.6/django/core/servers/", line 176, in runfastcgi
    WSGIServer(WSGIHandler(), **wsgi_opts).run()
  File "/var/lib/python-support/python2.6/flup/server/", line 113, in run
    ret =, sock)
  File "/var/lib/python-support/python2.6/flup/server/", line 98, in run
    if not self._threadPool.addJob(conn, allowQueuing=False):
  File "/var/lib/python-support/python2.6/flup/server/", line 74, in addJob
    thread.start_new_thread(self._worker, ())
thread.error: can't start new thread}}}

Change History (1)

comment:1 Changed 8 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

By my reading of that stack trace and your description, the problem lies with your configuration or fastcgi server, not with Django.

Note: See TracTickets for help on using tickets.
Back to Top