diff --git a/include/poller.php b/include/poller.php index 3a28b177c3..714d4c537c 100644 --- a/include/poller.php +++ b/include/poller.php @@ -11,6 +11,7 @@ if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) { } require_once("boot.php"); +require_once("dbm.php"); function poller_run(&$argv, &$argc){ global $a, $db; @@ -26,6 +27,10 @@ function poller_run(&$argv, &$argc){ unset($db_host, $db_user, $db_pass, $db_data); }; + $processlist = dbm::processlist(); + if ($processlist != "") + logger("Processlist: ".$processlist, LOGGER_DEBUG); + if (poller_max_connections_reached()) return; @@ -59,6 +64,11 @@ function poller_run(&$argv, &$argc){ while ($r = q("SELECT * FROM `workerqueue` WHERE `executed` = '0000-00-00 00:00:00' ORDER BY `created` LIMIT 1")) { + // Log the type of database processes + $processlist = dbm::processlist(); + if ($processlist != "") + logger("Processlist: ".$processlist, LOGGER_DEBUG); + // Constantly check the number of available database connections to let the frontend be accessible at any time if (poller_max_connections_reached()) return;