nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
455 stars 57 forks source link

pre-generate only ever returns "Command is already running." #328

Closed FrankelJb closed 4 months ago

FrankelJb commented 1 year ago

I'm running Nextcloud 25 in a Kubernetes cluster. This is all running fine and has been for over a year. I ran previewgenerator some time ago. However, I've just noticed that running ./occ preview:pre-generate only ever returns "Command is already running."

I've tried to restart the containers, redeploy them, disable and re-enable previewgenerator all to no avail. Is there some way to force the pre-generate? I've tried to read the code to see if I can delete something. However, I'm not very familiar with how Nextcloud extensions work.

f1ana commented 1 year ago

I just started encountering this as well. Not really sure how to proceed with fixing the issue.

st3iny commented 1 year ago

This sound like the generation process got stuck at some point and didn't reset the parallel processing lock. Usually, that should only happen if the previewgenerator process was interrupted.

I could add a new command to reset the pid lock in case of an error.

In the meantime, you can reset the lock manually by running the following query:

DELETE FROM
  oc_appconfig
WHERE
  appid = 'previewgenerator'
  AND configkey = 'pid';
st3iny commented 4 months ago

Enhancement to add a command to reset the lock is tracked in https://github.com/nextcloud/previewgenerator/issues/118.