CPU usage: many processes running

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

  • acrylian Administrator, Developer
    You did rename the root index.php file??? You should never rename any root or zp-core files.

    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
  • Yes. I renamed the root index.php (and put an empty index.html so the directory is not listed). The reason I have to do this is the system gets really slow because of many index.php processes. Even if I added password so nobody can view the images and index.php is supposed to be fast (just asking username and password), I still see a lot of index.php processes.

    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.
  • acrylian Administrator, Developer
    I really don't know how i.php could do anything if it is not called. Zenphoto surely does nothing by itself.
  • 1. If you renamed the Zenphoto root `index.php`, the Zenphoto gallery would not function at all. So I really do not understnd what you have done. Without that `index.php` script there is no `index.php` process possible.

    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.
  • Thank you, sbillard and acrylian. I was trying to find the cause of many index.php running for long time.

    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.
Sign In or Register to comment.