-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement command to reset the pid lock #118
Comments
Or it might be easier to just special-case PID1? :P |
Agreed, this could happen under some circumstances: previewgenerator/lib/Command/PreGenerate.php Lines 105 to 115 in bf04c0a
True, it is probably most likely to happen with Maybe also with Docker environments with their own PID namespaces?
Maybe. Or just check for the other matching running processes (that look like other copies of us) outright and error out as already running in that case. Related: #328 |
That is weird. Running exec should not start the command with PID 1 inside the running container. But yeah, having a command to reset the pid lock or a fail-safe is probably a good idea. |
In the meantime, the log can be reset by running the following raw SQL query: DELETE FROM
oc_appconfig
WHERE
appid = 'previewgenerator'
AND configkey = 'pid'; |
Since #93, I don't believe
pid
is ever reset as a fail-safe?Logs indicated that
pre-generate
was always returningcommand is already running
so I was getting suspicious. I finally checked theappconfig
and noticed thatpid == 1
, which will never not be running.I believe this could happen if the preview generator crashes or is interrupted while executing
php occ
directly (viadocker run/exec
). If this is the case, some time-based check might still be valuable in addition to thepid
check - that is, periodically update a watchdog timestamp in theappconfig
and treat the previous instance as dead if it hasn't been updated for a while?The text was updated successfully, but these errors were encountered: