mirror of https://github.com/django/django.git
Fixes #2969 -- Added maxRequests option for FCGI servers. Thanks, Michael Radziej.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
97dd47a8ed
commit
7bff9cc368
|
@ -31,6 +31,8 @@ Optional Fcgi settings: (setting=value)
|
||||||
port=PORTNUM port to listen on.
|
port=PORTNUM port to listen on.
|
||||||
socket=FILE UNIX socket to listen on.
|
socket=FILE UNIX socket to listen on.
|
||||||
method=IMPL prefork or threaded (default prefork)
|
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.
|
maxspare=NUMBER max number of spare processes to keep running.
|
||||||
minspare=NUMBER min number of spare processes to prefork.
|
minspare=NUMBER min number of spare processes to prefork.
|
||||||
maxchildren=NUMBER hard limit number of processes in prefork mode.
|
maxchildren=NUMBER hard limit number of processes in prefork mode.
|
||||||
|
@ -66,6 +68,7 @@ FASTCGI_OPTIONS = {
|
||||||
'maxspare': 5,
|
'maxspare': 5,
|
||||||
'minspare': 2,
|
'minspare': 2,
|
||||||
'maxchildren': 50,
|
'maxchildren': 50,
|
||||||
|
'maxrequests': 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
def fastcgi_help(message=None):
|
def fastcgi_help(message=None):
|
||||||
|
@ -103,6 +106,7 @@ def runfastcgi(argset=[], **kwargs):
|
||||||
'maxSpare': int(options["maxspare"]),
|
'maxSpare': int(options["maxspare"]),
|
||||||
'minSpare': int(options["minspare"]),
|
'minSpare': int(options["minspare"]),
|
||||||
'maxChildren': int(options["maxchildren"]),
|
'maxChildren': int(options["maxchildren"]),
|
||||||
|
'maxRequests': int(options["maxrequests"]),
|
||||||
}
|
}
|
||||||
elif options['method'] in ('thread', 'threaded'):
|
elif options['method'] in ('thread', 'threaded'):
|
||||||
from flup.server.fcgi import WSGIServer
|
from flup.server.fcgi import WSGIServer
|
||||||
|
|
Loading…
Reference in New Issue