Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed $2973: added minspare/maxspare/maxchildren options to runfcgi. …

…Thanks, James Crasta.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0fd9f6ec6bd4d98c22ca4791e90e7f3697804a48 1 parent 726756b
@jacobian jacobian authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 django/core/servers/fastcgi.py
View
12 django/core/servers/fastcgi.py
@@ -33,9 +33,9 @@
method=IMPL prefork or threaded (default prefork)
maxrequests=NUMBER number of requests a child handles before it is
killed and a new child is forked (0 = no limit).
- maxspare=NUMBER max number of spare processes to keep running.
- minspare=NUMBER min number of spare processes to prefork.
- maxchildren=NUMBER hard limit number of processes in prefork mode.
+ maxspare=NUMBER max number of spare processes / threads
+ minspare=NUMBER min number of spare processes / threads.
+ maxchildren=NUMBER hard limit number of processes / threads
daemonize=BOOL whether to detach from terminal.
pidfile=FILE write the spawned process-id to this file.
workdir=DIRECTORY change to this directory when daemonizing
@@ -110,7 +110,11 @@ def runfastcgi(argset=[], **kwargs):
}
elif options['method'] in ('thread', 'threaded'):
from flup.server.fcgi import WSGIServer
- wsgi_opts = {}
+ wsgi_opts = {
+ 'maxSpare': int(options["maxspare"]),
+ 'minSpare': int(options["minspare"]),
+ 'maxThreads': int(options["maxchildren"]),
+ }
else:
return fastcgi_help("ERROR: Implementation must be one of prefork or thread.")
Please sign in to comment.
Something went wrong with that request. Please try again.