12-31-2020, 08:02 PM
(12-31-2020, 07:48 PM)Tim Curtis Wrote: The session id is a static value in cfg_system and thus would always be returned but what I think is happening is the sql query is failing because the database is busy processing an update. It's due to an order of execution issue in worker.php. See the code snippet below.
Code:// Start watchdog monitor
sysCmd('/var/www/command/watchdog.sh > /dev/null 2>&1 &');
workerLog('worker: Watchdog started');
//
workerLog('worker: Ready');
$result = sdbquery("UPDATE cfg_system SET value='1' WHERE param='wrkready'", $dbh);
//
//
// BEGIN WORKER JOB LOOP
//
The fix would be to start watchdog after the update query for "worker: ready".
If you cold revert your change to watchdog and test this fix I'd be interested in knowing the results.
-Tim
Yes, it is the sql query that fails. I was not very precise in my wording initially.
OK, I'll test this in coming days.
See you in 2021