Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Official moOde 7.0.1 support thread
(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


Reverted the watchdog changes, applied only the fix you suggest in worker.php. After reboot I don't observe the errors anymore. So, we can conclude, this fix also works, however, I highly suggest to add another check to watchdog.sh similar to what I've proposed in PR to make an additional session file existence check before ever testing its permissions. Alternatively, rewrite the permission check test to be more rigorous (do not accept empty string). Otherwise there's still a small chance for the test to erroneously evaluate to True, which is something, we want to avoid.

BTW, what is the command (or set of commands) to restart all the Moode related services, to avoid rebooting in case of testing something? moodeutl -r?
Reply


Messages In This Thread
RE: Official moOde 7.0.1 support thread - by AlexTee - 01-02-2021, 12:45 PM
RE: Official moOde 7.0.1 support thread - by efung - 02-04-2021, 12:06 AM
RE: Upcoming moOde 7.1.0 release - by JonPike - 02-06-2021, 10:05 PM

Forum Jump: