I have a zenphoto installation with a massive image archive. I have subdivided my images into a hierarchy of albums and with the current version (1.4.5.9) album viewing performance is great!
However, it is nearly impossible for me to edit albums. Currently it is taking longer than 5 minutes for the edit album page to show up, It's long enough that the proxy on my firewall typically decides that the server isn't responding and drops the connection. In order to edit an album I either have to be on my home network or forward a port via. ssh to bypass my proxy.
If I trace the php-fpm server I see that it is calling stat() on every single image in my entire gallery, not just the images in the current album I am editing. Do you have any idea why this is happening and how I might be able to stop it?
I'm running zenphoto behind nginx and php-fpm. For the most part this is working wonderfully, it's just the album editing and some of the admin functions that are painfully slow.
Comments
http://www.zenphoto.org/news/problems-with-albums-and-images#the-albums-on-the-back-andor-backend-are-slow
You might use the table of content menu on the top right as the anchor link does not work in certain browsers.
Please read my whole post -- the problem isn't with albums it's with editing. I see the php process calling stat() on *every* image in my entire gallery when I edit an album, not just images in that album.
Honestly, I think it's either a bug or it has something to do with the iterating of tags. But it's odd that it is only calling stat(), I don't see it opening any of the image files.
I would also suggest to try the 1.4.6 beta.
There is nothing unusual showing up in any of the logs, not even the debug log is getting any data.
The image number settings don't affect anything, neither does the theme. I'm seeing it happen with every album in the gallery as well.
Also please read here how caching works on Zenphoto.
http://www.zenphoto.org/news/caching
Let me give an example. Let's say I have 4 albums, album1, album2, album3, album4. I go to my gallery main page which loads quickly. I then pick album1 and I see all of my album1 sub galleries and images displayed. If I select "edit album" at this point from the admin toolbox, I can go out for coffee (and maybe lunch) before the album edit page is displayed.
It will take upwards of 5 minutes to display the edit album page. If I look at the system I'll see the php-fpm process in top. If i strace that process I see it calling stat() for every file in every album, not just album1 and its sub albums. It will call stat() on every image in album1, then every image in album2, then album3 and so on. Since it's being called from php stat() won't tell me where this is being done, but it really looks like a bug that the system is trying to inspect every single image in the entire gallery whenever I edit any album.
If that all does not help you should open a ticket and post the extact and complete info from the system log there, too. Also a link to your site would probably help, just to see the size of the site.