Hi Piwigo team,
thanks for this really nice photo gallery. I am using it since a few years on my VPS to share some family photos and I really like all the options you guys coded in PHP for it.
Lately I have some issues on my VPS with 128 RAM after upgrading to the latest version 2.7.3. I uploaded some photos into the galleries folder without generating the corresponding thumbnails.
When the gallery is viewed I constantly get in dmesg Out of memory in UB: OOM killed process error message and OOM kills the mysql db process. I think this is because I haven't generated the thumbnails for different image sizes.
I have already lowered the PHP memory limit and changed to imagemagick, tried to amend vm.swappiness but none of this has resolved this issue.
I also wonder why Piwigo generates thumbnails and different image sizes at all? This takes up a lot of space, would it not be possible to simply use the original image and use CSS rules to display it accordingly to the device?
Thanks,
Mathias
Last edited by mathias (2015-01-22 13:05:46)
Offline
a simple question: do you to download dozen of HD pictures on a single web page on mobile?
also you need to increase not to decrease the memory limit
you can generate resized pictrues locally ; many threads about that
Offline
Ok Flop25, many thanks for your prompt reply. I searched the forum before and couldnt find an exact explanation for my error message so I thought it would make sense to post this. I know you can create the thumbnails locally. I will give it a try. Thanks for your reply.
Could you please also explain me why images are resized at all? The thumbnails make sense to reduce bandwith but the other versions?
I thought a CSS rule can be used so the image scaling is run on the client side instead of using server resources.
Offline
mmh yeah don't know why Google, facebook ect didn't thought that too...
let me remind you that the picture is resized only once, that's all, not for each visitors
Offline
Yeah makes sense Flop25. It is being generated once for example for an IPAD retina.
It will be generated another time for an IPAD 2 with a lower resolution screen.
In the end you will have multiple copies of the same image and they obviously take up space.
Currently my VPS has 20GB but when I estimated the amount of pictures I can store I only took into consideration the HD versions...
Maybe I spend some time in the future to change the source code to not use the resizing at all so that you always use hd images except for the thumbnails. I have unlimited bandwitch but only 20GB space...
Thanks,
Mathias
Last edited by mathias (2015-01-22 13:40:52)
Offline
Hi mathias,
If you use Piwigo default settings for photo sizes, the "multiple sizes" cache should not take that much space, compared to your original photos. If your photos are 10MB each (which is very common nowadays), an XXL will take less than 1MB, M-size around 300KB (these are approximate values)
If you don't like the multiple sizes, you can limit this features: go to [Administration > Configuration > Options > Photo sizes], and uncheck all sizes but M.
Multiple sizes are absolutely necessary for a photo manager like Piwigo. Maybe you don't need the 9 sizes, but at least a thumbnail and the M size (equivalent as Piwigo prior to version 2.4).
Now about the memory required, I think 128MB is very small. The ImageMagick "convert" script may need more than that, depending on the size (in pixels) of your original photo.
If you upload very small original photos (smaller than the configuration of the M size) then Piwigo won't generate a M size and display directly your original photo.
Offline
Hi PLG,
Thanks for your help.
Excellent answer, have a nice evening
Offline
http://piwigo.org/forum/viewtopic.php?id=26195 can be used to disable multiple sizes completely.
Offline