Rebuilding a large number of thumbnails

smd123

Joined: 2010-03-27
Posts: 4
Posted: Sat, 2010-03-27 02:30

Hi,

I'm having trouble rebuilding the thumbnails & resize images on my gallery. I switched servers (was running Fedora 9, now I'm running Windows 2k3 R2 w/ IIS). In the transition, I upgraded from Gallery 2.1 to 2.3. During the transition, I decided to rebuild all the thumbnails&resizes. When I went to maintenance to do the rebuild, it would run for a while, and time out. I did this a number of times, and a lot of the images were rebuilt. However, it is no longer rebuilding the images, and there are still quite a few that have not yet been rebuilt. When I press "rebuild", the browser simply hangs until I move away.

Task manager in Windows shows that ImageMagick is running (convert.exe takes 100% of one of the processors for a while).

I increased the time-outs in php.ini, and increased the admin login time in gallery to 6 hours, but it still does not work. In task manager, convert.exe & php-cgi.exe will run for a significant amount of time, and then stop.

No errors are logged in the IIS or PHP log files. Gallery logs errors with 2 images each time I do a rebuild, but that came with the first time I ran the rebuild. I can't find any other errors in the system.


Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.13 cgi-fcgi
Webserver = Microsoft-IIS/6.0
Database = mysqli 5.1.44-community, lock.system=flock
Toolkits = ArchiveUpload, Exif, ImageMagick
Acceleration = full/900, full/900
Operating system = Windows NT 5.2 build 3790
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
Rows in GalleryAccessMap table = 20
Rows in GalleryAccessSubscriberMap table = 17560
Rows in GalleryUser table = 4
Rows in GalleryItem table = 17559
Rows in GalleryAlbumItem table = 224
Rows in GalleryCacheMap table = 4

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2010-03-27 03:19
Quote:
Database = mysqli 5.1.44-community, lock.system=flock

You can't use file locking on Windows. It's either totally unreliable or shouldn't even work at all. Change that to database locking under Site Admin > General (first page you land on) and report back if things work.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
smd123

Joined: 2010-03-27
Posts: 4
Posted: Sun, 2010-03-28 03:02

Thanks! It appeared to work for a while. The browser still hangs, but the number of files in g2data continued to grow.

I ran several iterations, and now it spits out several pages of messages, with this error at the end:

Processing image 25570 of 33857
--------------------
Error: building 53217: Error (ERROR_TOOLKIT_FAILURE)
in modules\imagemagick\classes\ImageMagickToolkit.class at line 409 (GalleryCoreApi::error)
in modules\imagemagick\classes\ImageMagickToolkit.class at line 40 (ImageMagickToolkit::_getImageDimensions)
in modules\core\classes\GalleryDerivativeImage.class at line 166 (ImageMagickToolkit::getProperty)
in modules\core\classes\helpers\GalleryDerivativeHelper_advanced.class at line 844 (GalleryDerivativeImage::rebuildCache)
in modules\core\classes\GalleryCoreApi.class at line 997 (GalleryDerivativeHelper_advanced::rebuildCache)
in modules\core\classes\helpers\GalleryDerivativeHelper_simple.class at line 50 (GalleryCoreApi::rebuildDerivativeCache)
in modules\core\classes\GalleryCoreApi.class at line 984 (GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent)
in modules\core\classes\BuildDerivativesTask.class at line 113 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent)
in modules\core\AdminMaintenance.inc at line 128 (BuildDerivativesTask::run)
in ??? at line 0 (AdminMaintenanceController::runTask)
in modules\core\classes\GalleryTemplateAdapter.class at line 1092
in F:\inetpub\dagenet\g2data\smarty\templates_c\%%3951934568\matrix\%%3A^3A8^3A818B59%%theme.tpl.php at line 75 (GalleryTemplateAdapter::trailer)
in lib\smarty\Smarty.class.php at line 1255
in modules\core\classes\GallerySmarty.class at line 61 (Smarty::fetch)
in modules\core\classes\GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88

Any ideas? It appears to still be creating images, but I would like to fix these errors.

Thanks again!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2010-03-28 04:12

Post a link to phpinfo or print a phpinfo page to PDF and post that:
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
smd123

Joined: 2010-03-27
Posts: 4
Posted: Sun, 2010-03-28 18:51

Here it is.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2010-03-28 20:09

o.k. I was thinking you were running into a resource limitation, which you may still be, but it could be a particular image or set of images that's causing the failure.

Try putting Gallery into debug mode and run the rebuild again. At the very least we should see which image(s) it's failing on and hopefully some reason as to why.
FAQ: How to set/use Gallery in debug mode?

If you copy and paste the debug output into a text file, zip that file and attach we can take a look at it.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
smd123

Joined: 2010-03-27
Posts: 4
Posted: Sat, 2010-04-03 02:16

Well, after running the rebuild process a few (a LOT) more times, it finished. Since everything looks fine to me, I will just leave it as is, and assume that bad image files caused those errors. Thank you so much for your help!!