csquared / IMGKit

Uses wkhtmltoimage to create JPGs and PNGs from HTML
Other
727 stars 104 forks source link

IMG kit crashes 50% of the time when trying to generate image from highcharts #76

Open Shopwiz opened 9 years ago

Shopwiz commented 9 years ago

Hello,

Here is the error I get when trying to generate a image (.png) from an highchart graph. I don't think it has something to do with highcharts since we sometimes (more rarely) have errors when generating PDF as well.

Can you please fix or help us with this problem? Thanks, WizVille team.

No live threads left. Deadlock? /home/wizville/.rbenv/versions/2.1.5/lib/ruby/2.1.0/open3.rb:262:in value' /home/wizville/.rbenv/versions/2.1.5/lib/ruby/2.1.0/open3.rb:262:inblock in capture3' /home/wizville/.rbenv/versions/2.1.5/lib/ruby/2.1.0/open3.rb:199:in popen_run' /home/wizville/.rbenv/versions/2.1.5/lib/ruby/2.1.0/open3.rb:93:inpopen3' /home/wizville/.rbenv/versions/2.1.5/lib/ruby/2.1.0/open3.rb:252:in capture3' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/shell.rb:49:inexecute_open3' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/shell.rb:36:in block (2 levels) in execute' /home/wizville/.rbenv/versions/2.1.5/lib/ruby/2.1.0/timeout.rb:76:intimeout' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/shell.rb:35:in block in execute' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/logger.rb:34:incall' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/logger.rb:34:in block in benchmark' /home/wizville/.rbenv/versions/2.1.5/lib/ruby/2.1.0/benchmark.rb:294:inrealtime' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/logger.rb:34:in benchmark' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/logger.rb:21:indebug' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/shell.rb:34:in execute' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/shell.rb:18:inrun' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/tool.rb:92:in call' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/tool.rb:53:innew' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/image.rb:492:in mogrify' /home/wizville/app/preprod.wizville.fr/shared/bundle/ruby/2.1.0/gems/mini_magick-4.1.0/lib/mini_magick/image.rb:378:inmethod_missing'

jcoyne commented 9 years ago

@Shopwiz I also get deadlocks with minimagick but I'm not using IMGKit. We've found that switching to posix-spawn (over popen3) fixes the issue: https://groups.google.com/forum/#!searchin/hydra-tech/derivatives$20deadlock/hydra-tech/_L2ysL1A0M8/2agSkvWVFAAJ