I upgraded to 1.2.6 recently. The site is hosted at bluehost.com and not many people visit the site. Today I noticed severe CPU throttling and then checked running processes. I found that many processes are running zenphoto's index.php.
At first I thought maybe too many people are accessing the site. So I added a password to protect whole gallery.
There are still a lot of processes for index.php. I then renamed index.php.
Now there is no process associated with index.php and CPU is less busy. However, I still see many processes associated with zp-core/i.php from time to time.
So here are my questions.
1. Why is index.php so CPU intensive?
2. After I already renamed index.php, what started zp-core/i.php?
Thank you very much for any suggestions to solve the problem.
Comments
Anyway this i.php process you probably see are the image generating processes that generate the thumbs and sized down iamges for theme display from the full images you uploaded. This is done once and if your images are big that might overload your server. Please read specifically here to learn how Zenphoto works:
http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#11
http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#22
Since zenphoto uses "lazy-load" images, the pre-caching should not take place unless someone is viewing the gallery. However, zp-core/i.php is still running somehow. I do not know why it is accessed even if index.php is renamed.
I will rename index.php back to see if anything has improved.
Thanks.
2. The `i.php` script is linked to from each image/thumbnail that has not been cached. That includes ones on the back-end so you could see it running if you are, for instance, visiting an album admin page.
It could be some people trying to grab the whole gallery. So I set gallery password. Although the number of index.php instances is reduced, I can still see more than 20 processes. I do not know why because the I am the only one who knows the password and was not accessing root index.php.
I then renamed index.php. Of course, the gallery will not function but other sites hosted on the same server can function more smoothly. After renaming index.php, the CPU load is reduced to a normal level. But I saw zp-core/i.php running from time to time. From sbillard' reply, I guess someone are still in the gallery using old pages (but doesn't setting password prevent this?)
Anyway, I changed all the passwords and hash salt, expecting root index.php won't take much time, just asking for password, and the gallery password will help reduce the traffic and CPU load.