Admin.php using too much CPU

I have a gallery with over 30,000 images. My SQL file is only about 30mb though. Every time I add new galleries I usually do it by creating a folder in FTP, as the ACP just doesn't work for me. It goes incredibly slow and sometimes does not load at all.

I was trying to get into one of my folders today to re-arrange the order of its subalbums, but it wouldn't load. It stops half way. Looking at my process manager, I saw that /zp-core/admin.php was using up 74.1 percent of the CPU load and 2.1 percent of the memory.

Why?

Comments

  • acrylian Administrator, Developer
    Please see this current and similar topic: http://www.zenphoto.org/support/topic.php?id=10292

    Also there is info on the user guide's troubleshooting how Zenphoto works regarding images. What you see is most likely your server not being able to process the images you uploaded
    http://www.zenphoto.org/news/troubleshooting-guide
  • But its processed every image on the actual gallery pages. Its just the ACP that's slow. A lot of the times, I'll get 500 Internal Server Errors trying to edit a gallery.
  • acrylian Administrator, Developer
    No, it does not process all, it goes randomly through all to set an album thumb. If it has not been cached for the display it will be. The more images in the more albums you have the more it might need to cache. And if the image dimensions are quite big your server might not be able to process that. (see the troubleshooting to understand how Zenphoto being filesystem based works please).

    On the images tab of course the display for the images on the left need to be generated as well.

    So, either set a fixed album thumb for each album or use the option to show a stand-in replacement image for the albums list. For the images try using less images per page.

    Additionally you might want to consider to use smaller images.
  • All of my images are cached, though.
  • acrylian Administrator, Developer
    How do you know that all images are cached with 30000 of them? If you use any of the pre cache tools older Zenphoto releases have, these don't apply to the backend.
  • I'm talking about editing specific galleries. i.e. http://domain.com/zenphoto/zp-core/admin.php?page=edit&album=album-name-here

    It either loads verrrry slowly or the page stops loading halfway or I get a 500 error.

    I know all the images are cached because I have accessed that gallery on the main page and have look at all the images inside. I have 30,000 images, but they're not all in one gallery.
  • I know all the images are cached because I have accessed that gallery on the main page and have look at all the images inside
    Which of course has nothing to do with caching images for the back-end. But most likely the problem is with your thumbnail selection. See the thread pointed to by acrylian.
  • The thread doesn't really tell me much. =(
  • Sorry, I meant the post here by acrylian with regard to album thumbnail selection.
  • I can't edit the default album thumbnail because I cannot get into an album and edit it.
  • acrylian Administrator, Developer
    So you can't access the mail albums tab at all? Then your only chance is to access the album(s) via the admin toolbox from the front end only.

    You probably might need to consider to upgrade your server so it is able to do the task especially if these images are quite big dimension wise.
  • Is there any way to implement album sorting in the front end?
  • That is a back-end function. It is accessable by appropriately permissioned users via the admin toolbox which will show on the front end.

    You ask if there is any way to implement it for the front end and of course the answer is yes since the technique used on the back end could also be used on the front end. However we have no intention of doing this as it seems unnecessary and would present all sorts of security risks.
  • So what do I do? I can't edit my albums and my server is already pretty top notch as it is.
  • Did you try clicking on the button to use thumb standins?
  • Where do I find that option?
  • acrylian Administrator, Developer
    Well, that one is on the albums tab you cannot access actually... You probably need to set that via a MySQL query in this case I fear (sorry, don't know how it is called there right now).

    If you can access Options > Gallery see also if these options are not checked:
    Gallery behaviour > visual thumb selection
    Gallery behaviour > show subalbum thumbs
  • Your first post said that the page loads partly. If so, then the button is at the top of the list of albums. If your page is not loading at least that far, then the problem is entirely different.
  • I am able to access the options page and while I already have Visual Thumb checked, there is no option for "Show Subalbum Thumbs." Perhaps that was added in a later version. I'm running on 1.2.1, I believe.
  • acrylian Administrator, Developer
    Since you did not tell the version we assumed the current 1.4.2. Zenphoto 1.2.1 is ancient and we can't support such old versions (we don't release new ones for no reason).

    So before we talk any further, please first upgrade. (btw, if your server is too slow "visual thumb selection" should be off by any means).
  • Is there a file I can edit in 1.2.1's zp-core folder that would remove the images from even displaying in the first place in album edit?

    I'll upgrade, but it's not something I can do at current.
  • As mentioned by acrylilan--we do not support such old versions of Zenphoto. You need to upgrade. Specially given the security vulnerabilities of such old software.
Sign In or Register to comment.