-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
We need limit the amount of previews generated at once when listing images in Files #15075
Comments
it would be interesting if you can test this pull request to see how it improves (or not) : #17028 Indeed, when you browse the files for the first time, two previews are generated for each picture. I'm being told by nextcloud guys that those two previews are used to improve speed when generating previews from big raw files (they generate a big preview that should be smaller than your raw file, so it should be faster next times). There are no measurements for this, but IMO generating two previews has a very bad impact on first load (what you are doing here). Please test it and report back... |
Also, as a short term solution I reduced my php-fpm pool size to prevent overload |
I agree we should do something like this. |
Do you mean on the server, globally, or on the client side (javasript) ? |
Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you! |
yes indeed. it will be relesed with nc26. |
Merged and fixed with NC26. |
Hello. |
Did you try to set I seems you use mod-php? I strongly recommend to switch to php-fpm, so there is no new Apache process with bundled PHP spawned on every connection and task, but things are handled by the dedicated FPM server. This should be much more efficient for concurrent connections. |
Thank you. I have been looking for that setting, unsuccessefully. I will try it now.. |
I have followed this document to install Nextcloud. |
Um, yeah, that should be updated, IMO. For some reason it is also still the default PHP variant in Debian, so it is at least easier to install mod-php. Let's see first whether limiting the concurrently generated previews works, just in case there has been a bug introduced regarding this. |
Cannot confirm that it helped, since i've already generated all previews using Preview Generator plugin. I will perform an experiment later, on a copy of the server. Sorry for off topic, but could you point me to a guide on how to install Nextcloud with PHP-FPM? And should i switch from Apache to Nginx? |
A new Apache process spawns for every connection to the backend, not just for preview generation requests. Using FPM implies the other benefit that a more efficient Apache MPM (Multi-Processing Module) can be used, i.e. the event MPM instead of the prefork MPM. It does not create an own process for each request, but does this via threads of a smaller/fixed amount of worker processes. No need to install Nginx. I is known to be more efficient for static websites, but I'm not aware of any benefit for dynamic websites like Nextcloud. It is probably often confused with PHP-FPM as it is commonly used with Nginx, which has no implementation like the Apache mod-php. Install it like this: apt install php-fpm
a2dismod php8.2 mpm_prefork
a2enmod mpm_event proxy_fcgi
a2enconf php8.2-fpm
systemctl restart apache2 If it works, you can uninstall mod-php apt autopurge libapache2-mod-php |
Background: ariselseng/camerarawpreviews#31
User has encryption enabled, lists files in the Files app in details mode, scrolls to the bottom, and triggers hundreds of previews being generated. The problem gets even worse due to encryption + big raw files (enabled previews with my app). Preview generator is not the answer due to encryption.
We should make sure not more than x amount of images are being generated preview for at the same time.
The text was updated successfully, but these errors were encountered: