ImageMagick doesn't work on PHP when get 700K rows

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Robert_CA
Posts: 2
Joined: 2016-01-11T16:21:35-07:00
Authentication code: 1151

ImageMagick doesn't work on PHP when get 700K rows

Post by Robert_CA »

PHP exec(convert) doesn't work if the mysql query got over 700K database rows, but it works on 400K rows.

I run it on a 1GB RMA machine. If the total of rows over 700K, convert would not export any images to disk, and returns error -1. If the total of rows around 400K, everything would be fine. I had checked the memory usage. In 700K rows, the memory has 70MB free RAM, and in 400K it has 130MB free RAM.

Can anyone help me out? Thanks.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick doesn't work on PHP when get 700K rows

Post by magick »

Take a look @ php.ini. PHP typically has a conservative memory limit. Try updating the limit and see if that fixes the problem.
Robert_CA
Posts: 2
Joined: 2016-01-11T16:21:35-07:00
Authentication code: 1151

Re: ImageMagick doesn't work on PHP when get 700K rows

Post by Robert_CA »

Thanks. The memory_limit had set to be -1 as unlimited. It doesn't solve this issue.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick doesn't work on PHP when get 700K rows

Post by magick »

Ok, next up, let's reduce the memory resource requirement. You can set up a policy per viewtopic.php?f=4&t=26801. Or add -limit memory 64mb -limit map 128mb as an option to your convert command-line.

Still doesn't work? Try your command outside your PHP script directly on the command-line.

Still doesn't work? Add -debug cache to your convert command-line and post the results here so we can insight into why its failing.
Post Reply