Intervalometerator
Intervalometerator copied to clipboard
Intermittent "502 BAD GATEWAY" error after setting the Pi's time
Setting the Pi's date/time on the /system page might result in the intvlm8r crashing with a "502 BAD GATEWAY" error.
The intvlm8r also logs a [CRITICAL] WORKER TIMEOUT in gunicorn.error:
[2022-10-03 07:51:26 +1100] [30621] [DEBUG] POST /system
[2022-10-03 07:51:26 +1100] [30621] [DEBUG] This is the /system POST page
[2022-10-03 07:51:26 +1100] [30621] [DEBUG] Yes we got the SyncSystem button & value 20221003083353
[2022-10-03 07:51:26 +1100] [30621] [DEBUG] Checked: setPiTime
[2022-10-03 08:33:53 +1100] [30621] [DEBUG] setTime result = Mon 3 Oct 08:33:53 AEDT 2022
[2022-10-03 08:33:53 +1100] [30621] [DEBUG] GET /system
[2022-10-03 08:33:53 +1100] [380] [CRITICAL] WORKER TIMEOUT (pid:30623)
[2022-10-03 08:33:53 +1100] [30623] [INFO] Worker exiting (pid: 30623)
Root cause
The "worker-bees" that run the intvlm8r are set to automatically restart if they've been idle/waiting for something for > 5 minutes. Changing the real time upsets the means they use to test this, and they restart.
This is a known issue in Gunicorn: https://github.com/benoitc/gunicorn/issues/1965
Workaround
Just press F5/reload the page. The "crash" is only for the time it takes the workers to restart.
- Greig.