Django

Code

Changeset 4033

Show
Ignore:
Timestamp:
11/06/06 20:01:16 (2 years ago)
Author:
jacob
Message:

Fixed $2973: added minspare/maxspare/maxchildren options to runfcgi. Thanks, James Crasta.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/servers/fastcgi.py

    r3954 r4033  
    3434  maxrequests=NUMBER   number of requests a child handles before it is  
    3535                       killed and a new child is forked (0 = no limit). 
    36   maxspare=NUMBER      max number of spare processes to keep running. 
    37   minspare=NUMBER      min number of spare processes to prefork
    38   maxchildren=NUMBER   hard limit number of processes in prefork mode. 
     36  maxspare=NUMBER      max number of spare processes / threads 
     37  minspare=NUMBER      min number of spare processes / threads
     38  maxchildren=NUMBER   hard limit number of processes / threads 
    3939  daemonize=BOOL       whether to detach from terminal. 
    4040  pidfile=FILE         write the spawned process-id to this file. 
     
    111111    elif options['method'] in ('thread', 'threaded'): 
    112112        from flup.server.fcgi import WSGIServer 
    113         wsgi_opts = {} 
     113        wsgi_opts = { 
     114            'maxSpare': int(options["maxspare"]), 
     115            'minSpare': int(options["minspare"]), 
     116            'maxThreads': int(options["maxchildren"]), 
     117        } 
    114118    else: 
    115119        return fastcgi_help("ERROR: Implementation must be one of prefork or thread.")