Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Jacob Kaplan-Moss authored November 07, 2006

Showing 1 changed file with 8 additions and 4 deletions. Show diff stats Hide diff stats

  1. 12  django/core/servers/fastcgi.py
12  django/core/servers/fastcgi.py
@@ -33,9 +33,9 @@
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,7 +110,11 @@ def runfastcgi(argset=[], **kwargs):
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
 

0 notes on commit 0fd9f6e

Please sign in to comment.
Something went wrong with that request. Please try again.