Please could someone help me.
Problem (Cause)
I have uploaded my entire photo album to gallery2 and did so by uploading files without building thumbnails. I did this because many of my photo albums contain over 300 images, and the browser session was timing out if I uploaded more than about 70 images while creating the thumbnails (I have been using the "from local server" method of loading images). As a result visiting my albums for the first time takes a while (expected) but also sometimes gives me a error 500 from IIS (I assume the dynamic thumbnail build is taking too long). I would therefore like to trigger a build of the thumbnails, but running the maintenance job also times out in IIS with an error 500. Annoyingly IIS7 does not give any details or reasons on the error page.
Request (how I think this could be solved)
I would like to trigger the thumbnails and resized images to build from a command prompt if possible rather than through the browser interface so the IIS timeout is avoided. Is this possible?
Gallery version (not just "2"): 2.3 core 1.3.0
PHP version (e.g. 5.1.6): 5.2.6 cgi-fcgi
PHPInfo Link (see FAQ): http://davidi.no-ip.com/test.php
Webserver (e.g. Apache 1.3.33): IIS 7 (Windows Vista x64)
Database (e.g. MySql 5.0.32): MySQL 5.0
Activated toolkits (e.g. NetPbm, GD): ImageMagick 6.3.9 Q16, Jpegtran
Operating system (e.g. Linux): Windows Vista x64
Browser (e.g. Firefox 2.0): Firefox 3.0.4 and IE7 (latest updates)
Posts: 6
Moved this into the problems forum. Can someone help me please?
Posts: 1
how do i change date on photos already uploaded
Posts: 33
I have had the same issue when trying to rebuild thumbnails. I have thousands of pictures in my galleries. I don't know of a way to do from a command line, but when I did was perform the rebuild thumbnails and it would time out after a little b it (maybe 200 pictures). I would then rebuld again and it seems to start where it left off and do another 200. I would keep doing this over and over until it was all done. This is tedious and time consuming, but it worked for me...
I agree that a command-line process would be great for issues like this.
Posts: 33
Bad921,
Please post a new thread instead of replying to someone else's issue. This will get you better results and it is considered very bad etiquette to ask a question under someone else's topic.
Thanks
Posts: 6
Joel,
Thank you for the comment.
Dave
Posts: 33
David,
Did this work for you? (I know its just a workaround...)
Posts: 6
Joel,
To be honest I am not sure yet - I am still seeing the timeouts when I run the build resizes/thumbnails, but then I have 8700 pictures in my albums, and I don't have that much patience at any given time!
I will run it through a few more times over this weekend and let you know if I get to the end!
Dave
Posts: 2
I have exactly the same problem - thumbnails build times out. I have tried to run it several times, but it looks like it times out at the same point - it does not pass over 330 photos..
any hints on how to generate thumbnails off-line?
Posts: 6
I am still struggling with this problem. It is really causing me some grief, and unfortunately may lead to me having to discard Gallery2 if I cannot find a solution.
Can anyone make a suggestion or recommendation for how to resolve this issue?
Posts: 58
Sorry, I know this thread is a few months old, but I too have had timeout issues with thumbnail rebuilds. This is usually due to the hosting service and their script timeouts. I moved the gallery to my local PC since I don't need it online anymore. Still plagued with thumbnail rebuild due to the number of images (147K of them).
I put this together last night after some digging in the php code:
It's currently rebuilding my thumbnails offline, some 147000 of them. I've taken shortcuts, so you can run this at your own risk. So far, no issues. It simply does what the BuildDerivativesTask.class does to do the work just like gallery2 does, but I'm skipping out other stuff, etc. Ideally, this should call the BuildDerivativesTask class, but I didn't need the extra stuff.
Yes, this is on IIS (MYBASEDIR gives that away) against postgresql database.
I just have it as a php script on my machine and run it from command line and will set it up as a job later on.
Posts: 3
Use the Opera browser, then right-click the "run now"-link on Build all thumbnails/resizes and select "Open in New Tab" and in the new tab right-click anywhere and select Reload Every -> 5 Seconds. Then you leave it running in the background for a few hours. (When its nearly done you can change it to Reload Every -> 30 Seconds, just so that it won't keep hammering the website after its done building all resizes before you notice it and turn off the auto-reload.)
Posts: 58
Wouldn't that be firing off the rebuild every 5 seconds then?
Sometimes I find it useful to dig up the related source file and look for guaranteeTimeLimit function calls that gallery makes and set them to something ridiculous. This sorted out an issue I had recently where a task (can't remember which one now) would just stop and leave a blank page. Setting the time limit to 5000 sorted it out. I have a huge gallery so most of the time the figures set for guaranteeTimeLimit don't quite apply.
Posts: 3
No, that timeout starts when the page has finished loading. So it might be rebuilding for 5 minutes and when the lock timeout or whatever error comes that causes the page to stop loading opera will wait 5 seconds and then reload the page causing the rebuilding to continue.
Posts: 58
Ah, I see. That will do nicely for those who don't want to dig into scripting jobs, etc.