Ticket #2969: fastcgi.diff

File fastcgi.diff, 1.2 KB (added by mir@…, 18 years ago)

The promised patch

  • django/core/servers/fastcgi.py

    a b Optional Fcgi settings: (setting=value)  
    3131  port=PORTNUM         port to listen on.
    3232  socket=FILE          UNIX socket to listen on.
    3333  method=IMPL          prefork or threaded (default prefork)
     34  maxrequests=NUMBER   if positive: how many requests a child handles
     35                       before it is killed and a new child forked.
    3436  maxspare=NUMBER      max number of spare processes to keep running.
    3537  minspare=NUMBER      min number of spare processes to prefork.
    3638  maxchildren=NUMBER   hard limit number of processes in prefork mode.
    FASTCGI_OPTIONS = {  
    6668    'maxspare': 5,
    6769    'minspare': 2,
    6870    'maxchildren': 50,
     71    'maxrequests': 0,
    6972}
    7073
    7174def fastcgi_help(message=None):
    def runfastcgi(argset=[], **kwargs):  
    103106            'maxSpare': int(options["maxspare"]),
    104107            'minSpare': int(options["minspare"]),
    105108            'maxChildren': int(options["maxchildren"]),
     109            'maxRequests': int(options["maxrequests"]),
    106110        }
    107111    elif options['method'] in ('thread', 'threaded'):
    108112        from flup.server.fcgi import WSGIServer
Back to Top