28 onPersistentOverload(actDie),
29 defaultQueueSize(true)
40 onPersistentOverload(actDie),
41 defaultQueueSize(true)
66 if ( (n_active + n_idle) < n_max)
return n_idle;
69 return (n_max - n_active);
86 debugs(0,
DBG_CRITICAL,
"ERROR: The maximum number of processes cannot be less than 1.");
93 if (strncmp(token,
"startup=", 8) == 0) {
94 n_startup =
xatoui(token + 8);
95 }
else if (strncmp(token,
"idle=", 5) == 0) {
96 n_idle =
xatoui(token + 5);
98 debugs(0,
DBG_CRITICAL,
"WARNING: OVERRIDE: Using idle=0 for helpers causes request failures. Overriding to use idle=1 instead.");
101 }
else if (strncmp(token,
"concurrency=", 12) == 0) {
102 concurrency =
xatoui(token + 12);
103 }
else if (strncmp(token,
"queue-size=", 11) == 0) {
104 queue_size =
xatoui(token + 11);
105 defaultQueueSize =
false;
106 }
else if (strncmp(token,
"on-persistent-overload=", 23) == 0) {
107 const SBuf action(token + 23);
108 if (action.
cmp(
"ERR") == 0)
109 onPersistentOverload = actErr;
110 else if (action.
cmp(
"die") == 0)
111 onPersistentOverload = actDie;
113 debugs(0,
DBG_CRITICAL,
"ERROR: Unsupported on-persistent-overloaded action: " << action);
117 }
else if (strncmp(token,
"reservation-timeout=", 20) == 0)
118 reservationTimeout =
xatoui(token + 20);
128 if (n_startup > n_max) {
129 debugs(0,
DBG_CRITICAL,
"WARNING: OVERRIDE: Capping startup=" << n_startup <<
" to the defined maximum (" << n_max <<
")");
133 if (n_idle > n_max) {
134 debugs(0,
DBG_CRITICAL,
"WARNING: OVERRIDE: Capping idle=" << n_idle <<
" to the defined maximum (" << n_max <<
")");
138 if (defaultQueueSize)
139 queue_size = 2 * n_max;
unsigned int xatoui(const char *token, char eov)
static char * NextToken()
ChildConfig & updateLimits(const ChildConfig &rhs)
SubmissionErrorHandlingAction onPersistentOverload
how to handle a new request for helper that was overloaded for too long
int cmp(const SBuf &S, const size_type n) const
shorthand version for compare()
#define DBG_PARSE_NOTE(x)
#define debugs(SECTION, LEVEL, CONTENT)