Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixes #2969 -- Added maxRequests option for FCGI servers. Thanks, Mic…

…hael Radziej.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7bff9cc368e8052fc0ded2f01105545683390efe 1 parent 97dd47a
Russell Keith-Magee authored October 31, 2006

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

  1. 4  django/core/servers/fastcgi.py
4  django/core/servers/fastcgi.py
@@ -31,6 +31,8 @@
31 31
   port=PORTNUM         port to listen on.
32 32
   socket=FILE          UNIX socket to listen on.
33 33
   method=IMPL          prefork or threaded (default prefork)
  34
+  maxrequests=NUMBER   number of requests a child handles before it is 
  35
+                       killed and a new child is forked (0 = no limit).
34 36
   maxspare=NUMBER      max number of spare processes to keep running.
35 37
   minspare=NUMBER      min number of spare processes to prefork.
36 38
   maxchildren=NUMBER   hard limit number of processes in prefork mode.
@@ -66,6 +68,7 @@
66 68
     'maxspare': 5,
67 69
     'minspare': 2,
68 70
     'maxchildren': 50,
  71
+    'maxrequests': 0,
69 72
 }
70 73
 
71 74
 def fastcgi_help(message=None):
@@ -103,6 +106,7 @@ def runfastcgi(argset=[], **kwargs):
103 106
             'maxSpare': int(options["maxspare"]),
104 107
             'minSpare': int(options["minspare"]),
105 108
             'maxChildren': int(options["maxchildren"]),
  109
+            'maxRequests': int(options["maxrequests"]), 
106 110
         }
107 111
     elif options['method'] in ('thread', 'threaded'):
108 112
         from flup.server.fcgi import WSGIServer

0 notes on commit 7bff9cc

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