Ticket #2973: fastcgi-threadpool-options.diff
File fastcgi-threadpool-options.diff, 1.4 KB (added by , 18 years ago) |
---|
-
django/core/servers/fastcgi.py
33 33 method=IMPL prefork or threaded (default prefork) 34 34 maxrequests=NUMBER number of requests a child handles before it is 35 35 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 39 39 daemonize=BOOL whether to detach from terminal. 40 40 pidfile=FILE write the spawned process-id to this file. 41 41 workdir=DIRECTORY change to this directory when daemonizing … … 110 110 } 111 111 elif options['method'] in ('thread', 'threaded'): 112 112 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 } 114 118 else: 115 119 return fastcgi_help("ERROR: Implementation must be one of prefork or thread.") 116 120