Opened 5 years ago

Closed 4 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}}}

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.