Upload tab results in gateway timeout

I updated my gallery to the last version available (version 1.4.1.4). All the tabs of the admin panel are working properly except for the only necessary one: UPLOAD. :(
Every time I click on upload, I receive the following error message:
Gateway Time-out
The gateway did not receive a timely response from the upstream server or application.

Any idea?

Comments

  • About the only time consuming thing Zenphoto might be doing would be enumerating the albums you might upload to. That really should not cause a time-out, though, and should not have been significantly different from prior versions of Zenphoto. (What version did you upgrade from?)

    "Gateway timeout" indicates some sort of proxy server. Is that something you are deliberately using? We don't normally see ZP sites behind proxy servers.
  • Thanks for your reply.
    My previous version was 1.4.0 if I'm not wrong. With the older version it sometimes happened that I couldn't open the "Upload" page because of a gateway timeout.

    But now, uploading images is really impossible. Since the version update, I have never seen the upload page.
    I don't use proxy servers.

    ps. all the other tabs open their pages correctly. Upload is the only one with this problem.
  • So probably the difference is that there is some slight more overhead for processing that page than before. That is certainly possible since 1.4.1 allows for subrights on albums.

    But the real issue is why either script is taking longer than the "gateway" will accept. The gateway must be part of your ISP configuration. Perhaps you can find out what its timeout is set to?
  • Ok, this is what I tried: in zp-core/admin-upload.php I commented

    $albumlist = array();
    genAlbumUploadList($albumlist);

    and the page loaded correctly. I then added a different query (SELECT * FROM zp_albums ORDER BY id desc LIMIT 0,5) in order to have a slim dropdown menu. This works fine if you don't need to update older galleries.

    The only thing is... this query returns 4 galleries (not 5), and doesn't display the latest in the dropdown menu. Do you have a better solution in order to have $albumlist with just a few results?

    Thanks in advance
  • So, how many albums are in your gallery? I do not see that this function should be changed. Currently it lists all the albums a user can upload to. If that is "trunctated" then there would be albums which could not be accessed for upload. that would probably be anoying.

    You can try adding a script timeout extension in the loop of the function to see if the script is timing out. Add `set_time_limit(60);` to beginning of the function.
  • With over 8248 images (in 167 albums), we don't need to modify very old albums. I need a fast and reliable platform. Loading all the albums in the dropdown menu is a pain. I can't afford it.
    That's why I need to truncate that function.
    But I'd like to have a cleaner way to do it.
  • The number of images does not matter. And 167 albums is really a small number and should not be causing any undo delays of the upload page loading. So I would suspect that there is some general performance issue on your site. Still, try the `set_time_limit` suggestion above.
Sign In or Register to comment.