Opened 15 years ago

Closed 15 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: no UI/UX: no

Description

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 "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/var/lib/python-support/python2.6/django/core/management/__init__.py", line 340, in execute_manager
    utility.execute()
  File "/var/lib/python-support/python2.6/django/core/management/__init__.py", line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/lib/python-support/python2.6/django/core/management/base.py", line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/lib/python-support/python2.6/django/core/management/base.py", line 219, in execute
    output = self.handle(*args, **options)
  File "/var/lib/python-support/python2.6/django/core/management/commands/runfcgi.py", line 16, in handle
    runfastcgi(args)
  File "/var/lib/python-support/python2.6/django/core/servers/fastcgi.py", line 176, in runfastcgi
    WSGIServer(WSGIHandler(), **wsgi_opts).run()
  File "/var/lib/python-support/python2.6/flup/server/fcgi.py", line 113, in run
    ret = ThreadedServer.run(self, sock)
  File "/var/lib/python-support/python2.6/flup/server/threadedserver.py", line 98, in run
    if not self._threadPool.addJob(conn, allowQueuing=False):
  File "/var/lib/python-support/python2.6/flup/server/threadpool.py", line 74, in addJob
    thread.start_new_thread(self._worker, ())
thread.error: can't start new thread}}}

Change History (1)

comment:1 by Russell Keith-Magee, 15 years ago

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