[Ctl] add options to limit number of child process and number of request per process
- new option --max-children allows to define the maximum number of child process handling request (default is 5). - new option --max-request allows to define the maximum number of requests per child before they exit (default is infinite).
This commit is contained in:
parent
e284dcd35c
commit
20b82abc59
|
@ -44,6 +44,18 @@ def start(args):
|
|||
i += 1
|
||||
elif args[i] == '--spawn-cron':
|
||||
run_kwargs['spawn_cron'] = True
|
||||
elif args[i] == '--max-children':
|
||||
try:
|
||||
run_kwargs['max_children'] = int(args[i+1])
|
||||
except:
|
||||
raise SystemExit('--max-children needs an integer parameter')
|
||||
i += 1
|
||||
elif args[i] == '--max-requests':
|
||||
try:
|
||||
run_kwargs['handler_connection_limit'] = int(args[i+1])
|
||||
except:
|
||||
raise SystemExit('--max-requests needs an integer parameter')
|
||||
|
||||
i += 1
|
||||
|
||||
try:
|
||||
|
|
Reference in New Issue