Skip to content

Commit b89b0b0

Browse files
committed
- issue2551275 - Allow configuring max_children in roundup-server.
new -m and --max_children command line arguments and max_children config file setting for roundup_server.py/roundup-server. CHANGES.txt, admin_guide.txt, roundup-server.1 updated.
1 parent c100128 commit b89b0b0

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ Features:
144144
hash function using PBKDF2-SHA512 available. Will be default in
145145
future. Directions for upgrading security by using it now is
146146
included in upgrading.txt. (John Rouillard)
147+
- issue2551275 - Allow configuring max_children in roundup-server.
148+
When using roundup-server in fork mode, allow raising number of
149+
forked children above the default of 40.
147150

148151
2022-07-13 2.2.0
149152

doc/admin_guide.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ The basic configuration file is as follows (taken from the
115115
# Default:
116116
group =
117117

118+
# Maximum number of children to spawn using fork multiprocess mode.
119+
# Default: 40
120+
max_children = 40
121+
118122
# don't fork (this overrides the pidfile mechanism)'
119123
# Allowed values: yes, no
120124
# Default: no

roundup/scripts/roundup_server.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,9 @@ class ServerConfig(configuration.Config):
648648
"In order to use this option, "
649649
"the server must be run initially as root.\n"
650650
"Availability: Unix."),
651+
(configuration.IntegerNumberOption, "max_children", 40,
652+
"Maximum number of children to spawn using fork "
653+
"multiprocess mode."),
651654
(configuration.BooleanOption, "nodaemon", "no",
652655
"don't fork (this overrides the pidfile mechanism)'"),
653656
(configuration.BooleanOption, "log_hostnames", "no",
@@ -703,6 +706,7 @@ class ServerConfig(configuration.Config):
703706
"pidfile": "d:",
704707
"nodaemon": "D",
705708
"log_hostnames": "N",
709+
"max_children": "m:",
706710
"multiprocess": "t:",
707711
"template": "i:",
708712
"loghttpvialogger": 'L',
@@ -811,6 +815,7 @@ class ForkingServer(socketserver.ForkingMixIn,
811815
base_server):
812816
pass
813817
server_class = ForkingServer
818+
server_class.max_children = self["MAX_CHILDREN"]
814819
elif self["MULTIPROCESS"] == "thread":
815820
class ThreadingServer(socketserver.ThreadingMixIn,
816821
base_server):
@@ -942,6 +947,7 @@ def usage(message=''):
942947
-l <fname> log to the file indicated by fname instead of stderr/stdout
943948
-N log client machine names instead of IP addresses (much slower)
944949
-i <fname> set tracker index template
950+
-m <children> maximum number of children to spawn in fork multiprocess mode
945951
-s enable SSL
946952
-L http request logging uses python logging (roundup.http)
947953
-e <fname> PEM file containing SSL key and certificate

share/man/man1/roundup-server.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Control multi-process mode. \fBdebug\fP and \fBnone\fP are always
2525
available. If an invalid mode is specified the server starts in
2626
\fBnone\fP (also called single) mode. Default fork.
2727
.TP
28+
\fB-m\fP \fImax_children\fP
29+
Set the maximum number of child processes (servers). This value
30+
may need to be increased on a heavily loaded site. Default 40.
31+
.TP
2832
\fB-l\fP \fIfile\fP
2933
Sets a filename to log to (instead of stdout). This is required if the -d
3034
option is used.

0 commit comments

Comments
 (0)