Forums / Install & configuration / ImageMagick image size limitations?

ImageMagick image size limitations?

Author Message

Petter Arneson

Monday 24 October 2005 3:48:39 am

I'm currently working on a picture database, and I get into trouble when the customer publish pictures with size 12-14 mb. The customer uploads images with webdav, that workes fine, but when I browse the gallery it times out. It works fine with smaller images, so I guess the problem lies where ImageMagick tries to genererate the image class used for preview. When I publish only one large image, it takes approx. 60 sec, but when I try publishing two at once it times out.

According to log: "Query error: Lock wait timeout exceeded", and "Transaction in progress failed due to DB error, transaction was rollbacked."

I tried reducing jpeg quality to 50%, then I got errors:

Warning: eZImageShellHandler::convert
Failed executing: /usr/bin/convert '-quality' '50' '-geometry' '205x137' 'var/lha/storage/images/bildegalleri/hv0035/2089-1-nor-NO/hv0035.jpg' 
'JPEG:var/lha/storage/images/bildegalleri/hv0035/2089-1-nor-NO/hv0035_bildethumb.jpg', 
Error: , Return: 9

Error: eZImageManager::createImageAlias
Failed converting var/lha/storage/images/bildegalleri/hv0035/2089-1-nor-NO/hv0035.jpg      to alias original in directory var/lha/storage/images/bildegalleri/hv0035/2089-1-nor-NO

Any ideas?
Is it possible to tweak ImageMagick somehow?

www.vzt.no

Geoff Bentley

Wednesday 27 February 2008 11:57:29 am

I'm getting a similar error, but only for siteaccesses which are clustered, ie storing the storage folders in the database.

Small images seem to work ok (say < 50kb) but anything over brings up the same error:

Warning: eZImageShellHandler::convert  	Feb 27 2008 16:58:51

Failed executing: /usr/bin/convert '-quality' '75' '-geometry' '160x144>' 'var/ezpen/storage/images/users/community_users/ftp/test_ftp/32122-8-eng-NZ/test_ftp.jpg' 'JPEG:var/ezpen/storage/images/users/community_users/ftp/test_ftp/32122-8-eng-NZ/test_ftp_hero.jpg', Error code: 1

Error: eZImageManager::createImageAlias 	Feb 27 2008 16:58:51

Failed converting var/ezpen/storage/images/users/community_users/ftp/test_ftp/32122-8-eng-NZ/test_ftp.jpg to alias 'original' in directory 'var/ezpen/storage/images/users/community_users/ftp/test_ftp/32122-8-eng-NZ'

I've looked around these forums and found little joy in resolving this matter.

Any thoughts, anyone?

Linh Vu

Thursday 28 February 2008 3:12:50 pm

You can try activating ImageMagick warning definitions so you know what's going on with those error codes. There isn't any list of error codes for ImageMagick unfortunately.

Put this in your root .bashrc or whichever shell config you're using:

alias convert='convert -regard-warnings'

Or put that option -regard-warnings in the ezpublish config for ImageMagick (I'm not sure if this will work, but the previous way will definitely work).

If I had more time, I would write less code.

Linh Vu

Thursday 28 February 2008 3:18:35 pm

Btw it could be that ImageMagick is using way too much memory/disk and bombs out as a result. You may want to try setting the limits with this: http://www.imagemagick.org/script/command-line-options.php#limit

If I had more time, I would write less code.

Geoff Bentley

Sunday 02 March 2008 3:11:10 pm

Thanks for that. I don't think the problem is with size limitation, but with clustering. Images stored in the database are not found by imagemagick because it's trying to open the image on the filesystem, rather than through a http request (which would be caught by the Apache config).

I imagine this has been resolved in 4.0? We're currently on 3.9.

cousin mosquito

Tuesday 23 March 2010 8:34:06 pm

In my case it was caused by a clash of ownership after copying image files from one server to another.
In the new install I noticed that any new images uploaded were owned by daemon.

I changed the existing images (which were not loading) to daemon:daemon and the problem went away.

Asking the dumb questions for your benefit

eZ debug

Timing: Jan 18 2025 14:54:14
Script start
Timing: Jan 18 2025 14:54:14
Module start 'content'
Timing: Jan 18 2025 14:54:15
Module end 'content'
Timing: Jan 18 2025 14:54:15
Script end

Main resources:

Total runtime1.0906 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 587.8359180.8203
Module start 'content' 0.00480.9403 768.6563660.7500
Module end 'content' 0.94510.1454 1,429.4063341.0625
Script end 1.0905  1,770.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3722210.0002
Check MTime0.00160.1473210.0001
Mysql Total
Database connection0.00080.069010.0008
Mysqli_queries0.994791.20802070.0048
Looping result0.00260.23632050.0000
Template Total1.062697.420.5313
Template load0.00180.165520.0009
Template processing1.060897.267120.5304
Template load and register function0.00010.012110.0001
states
state_id_array0.00150.134110.0015
state_identifier_array0.00170.155520.0008
Override
Cache load0.00150.1409360.0000
Sytem overhead
Fetch class attribute can translate value0.00210.194650.0004
Fetch class attribute name0.00110.098690.0001
XML
Image XML parsing0.00550.504750.0011
class_abstraction
Instantiating content class attribute0.00000.0021110.0000
General
dbfile0.01040.9561390.0003
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs