-
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
occ preview:pre-generate command not working? #246
Comments
'generate-all' puts a pretty high load on the disk I/O and runs a reasonable time as it rescans all folders. I'd not recommend running it periodically via the standard cron, maybe once in a night. However, I also have the feeling that 'pre-generate' has an issue and is not doing what it should as I often see missing previews. |
[I'm on version Nextcloud 22.1.0] I also have issues, My picture overview used to load pretty quickly, but it stopped being fast recently, and indeed I noticed when I do:
I get:
When I do:
I get:
So how does one generate preview these days? |
@freekvh check if preview generator is still enabled on your instance. It might have been disabled during an update. |
Ah yes, I have to "enable untested app", my apologies, I didn't realize. I works now, preview:pre-generate is finished in seconds, preview:generate-all -vvv is now running and taking a long time. Do you know if preview:pre-generate is still the best thing to run? I guess preview:generate-all regenerates everything, not advisable on a regular basis I'd say. |
@freekvh yes, following the readme recommendations, it is not suggested to run the generate-all command regularly, only the pre-generate command should be scheduled. |
That's the plan, but running the preview:pre-generate via cron every 30 minutes and I'm browsing into a folder with plenty new pictures a day after they're synced into, I can watch the previews being generated one-by-one at this time. So pre-generate does not appear to work. |
Yes, I believe I am experiencing the same thing. |
"pre-generate" does absolutely nothing at all with no error output |
Strangely the command works when I issue it from the command line:
This is my crontab for the www-data user:
All commands from the are running fine except "occ preview:pre-generate". I don't understand why it runs from the command line but not from the cron job. |
Same for me. |
Same case:
I wonder if listener is doing its work... |
Upload some image files to your server and run the command. It should generate previews for new and changed files. It will also log all processed files when |
This is the way I did the test:
|
After a lot of test without getting the system to work as designed (probably because I do something wrong), I tried to find a solution that apparently works, although it is probably no more than a temporary fix.
My advice if you want to try:
I have to insist. This has to be just a temporary solution for those, like me, who can't get the system to work as designed (just in case this is working for you). |
Externally added files are not picked up by pre-generate. It only handles file changes from within Nextcloud (Client, Web, Android, etc.). If you often do external changes, you should run files:scan regularly so that Nextcloud properly picks up the changes. |
This is my cron. Do you think it's enough? |
New test:
My conclusion: everything works as expected when using nextcloud, but this is not the case when using syncthing, even sending the same file to the same folder in Nextcloud server. Why? I don't know, and I would like to know. |
I tried this command in docker's container and it starts generating previews |
The listener, which must get triggered for pre-generate to have anything to process, is only triggered for write events within Nextcloud Server. A scan isn't sufficient. This just sounds like #218 (unless this is occurring for non-externally added files). |
Hi I have the nextcloud 21.0.0.18,
When I use the command
occ preview:pre-generate
, there is no log and it takes just a few seconds. But I can see that the images were not processed.In contrast - when I do the
occ preview:generate-all
command, then, I get the log and it takes longer, but it works as expected.It says that I should use
pre-generate
in regular time intervals, but I can see that thegenerate-all
also is just searching for those images that have not been processed before. So is it ok if I just usegenerate-all
in a cronjob, instead of the other command?Am I missing something?
Thanks.
The text was updated successfully, but these errors were encountered: