/* Legacy parser interface */
#define parse_HelperChildConfig(c) (c)->parseConfig()
-#define dump_HelperChildConfig(e,n,c) storeAppendPrintf((e), "\n%s %d startup=%d idle=%d\n", (n), (c).n_max, (c).n_startup, (c).n_idle)
+#define dump_HelperChildConfig(e,n,c) storeAppendPrintf((e), "\n%s %d startup=%d idle=%d concurrency=%d\n", (n), (c).n_max, (c).n_startup, (c).n_idle, (c).concurrency)
#define free_HelperChildConfig(dummy) // NO.
#endif /* _SQUID_SRC_HELPERCHILDCONFIG_H */
storeAppendPrintf(entry, "\n");
storeAppendPrintf(entry, "%s basic realm %s\n", name, basicAuthRealm);
- storeAppendPrintf(entry, "%s basic children %d startup=%d idle=%d\n", name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle);
- storeAppendPrintf(entry, "%s basic concurrency %d\n", name, authenticateConcurrency);
+ storeAppendPrintf(entry, "%s basic children %d startup=%d idle=%d concurrency=%d\n", name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency);
storeAppendPrintf(entry, "%s basic credentialsttl %d seconds\n", name, (int) credentialsTTL);
storeAppendPrintf(entry, "%s basic casesensitive %s\n", name, casesensitive ? "on" : "off");
}
requirePathnameExists("auth_param basic program", authenticate->key);
} else if (strcasecmp(param_str, "children") == 0) {
authenticateChildren.parseConfig();
- } else if (strcasecmp(param_str, "concurrency") == 0) {
- parse_int(&authenticateConcurrency);
} else if (strcasecmp(param_str, "realm") == 0) {
parse_eol(&basicAuthRealm);
} else if (strcasecmp(param_str, "credentialsttl") == 0) {
basicauthenticators->childs = authenticateChildren;
- basicauthenticators->childs.concurrency = authenticateConcurrency;
-
basicauthenticators->ipc_type = IPC_STREAM;
helperOpenServers(basicauthenticators);
virtual void registerWithCacheManager(void);
virtual const char * type() const;
HelperChildConfig authenticateChildren;
- int authenticateConcurrency;
char *basicAuthRealm;
wordlist *authenticate;
time_t credentialsTTL;
list = list->next;
}
- storeAppendPrintf(entry, "\n%s %s realm %s\n%s %s children %d startup=%d idle=%d\n%s %s nonce_max_count %d\n%s %s nonce_max_duration %d seconds\n%s %s nonce_garbage_interval %d seconds\n",
+ storeAppendPrintf(entry, "\n%s %s realm %s\n%s %s children %d startup=%d idle=%d concurrency=%d\n%s %s nonce_max_count %d\n%s %s nonce_max_duration %d seconds\n%s %s nonce_garbage_interval %d seconds\n",
name, "digest", digestAuthRealm,
- name, "digest", authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle,
+ name, "digest", authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency,
name, "digest", noncemaxuses,
name, "digest", (int) noncemaxduration,
name, "digest", (int) nonceGCInterval);
list = list->next;
}
- storeAppendPrintf(entry, "\n%s negotiate children %d startup=%d idle=%d\n",
- name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle);
+ storeAppendPrintf(entry, "\n%s negotiate children %d startup=%d idle=%d concurrency=%d\n",
+ name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency);
storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "negotiate", keep_alive ? "on" : "off");
}
list = list->next;
}
- storeAppendPrintf(entry, "\n%s ntlm children %d startup=%d idle=%d\n",
- name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle);
+ storeAppendPrintf(entry, "\n%s ntlm children %d startup=%d idle=%d concurrency=%d\n",
+ name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency);
storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "ntlm", keep_alive ? "on" : "off");
}
NAME: url_rewrite_children redirect_children
TYPE: HelperChildConfig
-DEFAULT: 20 startup=0 idle=1 concurrency=0
+DEFAULT: 20 startup=0 idle=1 concurrency=1
LOC: Config.redirectChildren
DOC_START
The maximum number of redirector processes to spawn. If you limit
a->negative_ttl = -1;
a->children.n_max = DEFAULT_EXTERNAL_ACL_CHILDREN;
a->children.n_startup = a->children.n_max;
- a->children.n_idle = 99999999; // big to detect if the user sets their own.
+ a->children.n_idle = 1;
a->local_addr.SetLocalhost();
a->quote = external_acl::QUOTE_METHOD_URL;
token = strtok(NULL, w_space);
}
- /* our default idle is huge on purpose, make it sane when we know whether the user has set their own. */
- if (a->children.n_idle > a->children.n_max - a->children.n_startup)
- a->children.n_idle = max(1, (int)(a->children.n_max - a->children.n_startup));
+ /* check that child startup value is sane. */
+ if ((a->children.n_startup > a->children.n_max)
+ a->children.n_startup = a->children.n_max;
+ /* check that child idle value is sane. */
+ if (a->children.n_idle > a->children.n_max)
+ a->children.n_idle = a->children.n_max;
+ if (a->children.n_idle < 1)
+ a->children.n_idle = 1;
if (a->negative_ttl == -1)
a->negative_ttl = a->ttl;