Poller: The maximum number of connections can now be configured
This commit is contained in:
parent
b5100b3154
commit
211be5bfc5
2 changed files with 11 additions and 4 deletions
|
@ -130,9 +130,14 @@ function poller_max_connections_reached() {
|
|||
if (!$r)
|
||||
return false;
|
||||
|
||||
$max = intval($r[0]["Value"]);
|
||||
if ($max == 0)
|
||||
return false;
|
||||
// Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself.
|
||||
$max = get_config("system", "max_connections");
|
||||
|
||||
if ($max == 0) {
|
||||
$max = intval($r[0]["Value"]);
|
||||
if ($max == 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
$r = q("SHOW STATUS WHERE `variable_name` = 'Threads_connected'");
|
||||
if (!$r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue