Rebuilding Thumbnails fails

CostumerDeech

Joined: 2008-06-06
Posts: 6
Posted: Sun, 2010-01-03 21:10

When I try to rebuild my thumbnails, it works fine for a bit, then stops. ie: 1165 out of 14737

What I've tried so far:
1. Upgraded the installation from 2.3 rc1 to 2.3.1 stable
2. cleared all cache
3. installed ImageMagick and configured.
4. tried uninstalling GD, NetPBM and Jpegtran, leaving only ImageMagick
5. made sure PHP memory limit is 40mg
6. uninstalled EXIF and Square Thumbnails

In the Event log, I'm seeing this (after making Imagemagick the only graphics toolkit):

Quote:
Error (ERROR_TOOLKIT_FAILURE)in modules/imagemagick/classes/ImageMagickToolkit.class at line 638 (gallerycoreapi::error)
in modules/imagemagick/classes/ImageMagickToolkit.class at line 363 (imagemagicktoolkit::_transformimage)
in modules/core/classes/GalleryDerivative.class at line 452 (imagemagicktoolkit::performoperation)
in modules/core/classes/GalleryDerivative.class at line 274 (galleryderivativeimage::_rebuildcache)
in modules/core/classes/GalleryDerivativeImage.class at line 153 (galleryderivative::rebuildcache)
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/DownloadItem.inc at line 109 (gallerycoreapi::rebuildderivativecacheifnotcurrent)
in main.php at line 450 (downloaditemview::renderimmediate)
in main.php at line 104
in main.php at line 88

Request variables: Array
(
[view] => core.DownloadItem
[itemId] => 9523
[serialNumber] => 2
)

However, previously I still got the same error, except with NetPBM
ie: Error (ERROR_TOOLKIT_FAILURE)in modules/netpbm/classes/NetPbmToolkit.class at line 739 (gallerycoreapi::error)

I'm also seeing this:

Quote:
exec() [function.exec]: Unable to fork [( "/htdocs/im/bin/convert" "-quality" "75" "-size" "150x150" "-geometry" "150x150" "-strip" "/htdocs/g2data/albums/Contributors/basho/archon/archon29_4.JPG" "jpg:/htdocs/g2data/tmp/imgk_3qldJR" ) 2>"/htdocs/g2data/tmp/g2dbgUc3S5y"]
Request variables: Array
(
[view] => core.DownloadItem
[itemId] => 2386
[serialNumber] => 2
)
Some paths changed for security sake: /htdocs/im/bin is the location of my ImageMagick binaries, g2data is the location of my database. I actually had a security problem with scripts exploiting the location of my data, so the real path is a random number...

Quote:
Obligatory information:

Gallery URL = http://www.costume.org/gallery2/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 4.4.9 cgi
Webserver = Apache
Database = mysqlt 4.0.27-max-log, lock.system=flock
Toolkits = Getid3, LinkItemToolkit, Thumbnail, ImageMagick, NetPBM, Gd
Acceleration = none, none
Operating system = Linux infong 2.4 #1 SMP Tue Dec 18 22:34:10 UTC 2007 i686 GNU/Linux
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0
Rows in GalleryAccessMap table = 134
Rows in GalleryAccessSubscriberMap table = 14270
Rows in GalleryUser table = 76
Rows in GalleryItem table = 14232
Rows in GalleryAlbumItem table = 438
Rows in GalleryCacheMap table = 0

so, yea. I don't know what's going on.

-Deech

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2010-01-04 22:01

Try uninstalling NetPBM and GD. Then go to Site Admin > ImageMagick and click Test Settings.

What does it say?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
CostumerDeech

Joined: 2008-06-06
Posts: 6
Posted: Tue, 2010-01-05 00:30

I did do that. Sorry, I forgot to list it. I worked on this for several hours. :\

After uninstalling NetPBM and GD, I tested the imagemagick settings and they all passed.

Quote:
ImageMagick binary test results
Binary Name Pass/Fail
identify Passed
convert Passed
composite Passed

Version
ImageMagick 6.5.8-10

Supported MIME Types
The ImageMagick module can support files with the following MIME types:

image/gif
image/jpeg
image/pjpeg
image/png
image/svg+xml
image/bmp
application/photoshop
image/x-photo-cd
image/tga
image/jpeg-cmyk
application/photoshop-cmyk

Thanks for the reply.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2010-01-05 00:57

Then it should be working. Although, are your ImageMagick binaries really located under /htdocs/ or is it under /usr/bin or something like that?

What happens, with GD and NetPBM uninstalled (not just deactivated) and you go to Site Admin > Maintenance and select the rebuild thumbnails and resizes task?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
CostumerDeech

Joined: 2008-06-06
Posts: 6
Posted: Tue, 2010-01-05 02:07

Ah, "should be working" and "working" are two completely different things! :)

First, I'm on 1 and 1, so the bin is in htdocs, however, 1and1 has an odd way to naming things, thus htdocs is not actually my html root directory.
It actually goes something like this:

/fullpath/htdocs/g2data
/fullpath/htdocs/im/bin
/fullpath/htdocs/html/gallery2

Secondly, with GD and NetPBM uninstalled (not deactivated), I get the results I put in the original post.
I can't rebuild thumbnails from the maintenance page, it starts to rebuild, but then reaches some arbitrary number and stops. Something like 1165 before the progress bar stops and won't go any further. Actually, it would sometimes stop before then, but if I refreshed the page, it would keep going, but it would always stop completely at whatever number it decided, at the moment it's 1165, and won't go past, even if I do refresh. Occasionally that number will change if I clear out the cache (including the thumbnail cache), but it's always about the same.

Now, I can rebuild the thumbnails for individual albums, as long as they are small, but if there are more then a few sub-albums or over about 300 pictures, it will go for a little bit then stop, just like from the maintenance page.

I've got over 14,000 photos in this gallery, so you can see how that might get problematic.

It seems to indicate it may be a memory issue, but what's odd is that it worked just fine before. I did have a problem with the hidden module also freezing when I tried to unhide a large album. I ended up uninstalling the module and moving them to a new album to fix that, but then this problem started, so I figured it'd be a good idea to upgrade to a stable version before I started going much further.

Thanks!
-Deech

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2010-01-05 02:57

It's extremely odd that the ImageMagick binaries are installed under your account. Did you put them there or did 1&1? But the tests pass so it should be working.

Put Gallery into debug mode, try the rebuild operation and copy and paste the debug output into a text file, zip it and attach. Do not copy the Smarty Debug output, we don't need that.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Tue, 2010-01-05 05:21
Quote:
but then reaches some arbitrary number and stops. Something like 1165 before the progress bar stops

I bet the 1&1 has some limit imposed on # of processes, time or DB access limitations.
could be: FAQ: I seem to be running into some sort of MySQL query limit, is there anything that can be done?

but debug O/P should show some more info.

Suggestion: Do it in smaller chunks and start looking a new host.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team