mirror of
https://github.com/friendica/friendica
synced 2025-04-27 05:10:10 +00:00
Quit when processlist is too long
This commit is contained in:
parent
4914e8826b
commit
df337e57d1
3 changed files with 21 additions and 7 deletions
|
@ -28,8 +28,11 @@ function poller_run(&$argv, &$argc){
|
|||
};
|
||||
|
||||
$processlist = dbm::processlist();
|
||||
if ($processlist != "")
|
||||
logger("Processlist: ".$processlist, LOGGER_DEBUG);
|
||||
if ($processlist["list"] != "") {
|
||||
logger("Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
|
||||
if ($processlist["amount"] > 5)
|
||||
return;
|
||||
}
|
||||
|
||||
if (poller_max_connections_reached())
|
||||
return;
|
||||
|
@ -66,8 +69,11 @@ function poller_run(&$argv, &$argc){
|
|||
|
||||
// Log the type of database processes
|
||||
$processlist = dbm::processlist();
|
||||
if ($processlist != "")
|
||||
logger("Processlist: ".$processlist, LOGGER_DEBUG);
|
||||
if ($processlist["amount"] != "") {
|
||||
logger("Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
|
||||
if ($processlist["amount"] > 5)
|
||||
return;
|
||||
}
|
||||
|
||||
// Constantly check the number of available database connections to let the frontend be accessible at any time
|
||||
if (poller_max_connections_reached())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue