Watchdog script potential race condition
Opened this issue · 0 comments
randomorder commented
There is no locking mechanism preventing multiple instances of the watchdog script to run in parallel.
The watchdog script is meant to be run periodically (by CRON for instance) but every execution of the script can take quite a long time due to the HTTP request timeouts and retries so we can end up having multiple instances of the script running in parallel with unpredictable result.
Would be nice to have some kind of locking mechanism ( for instance http://mywiki.wooledge.org/BashFAQ/045 )