Problem/Motivation
There are couple of issues with the current way of spawning the ImageMagick processes on the shell via proc_open. See related issues.
Proposed resolution
See if using the Symfony process component the issues get fixed. Commit to 8.x-2.x, but since that component is in Drupal core's composer.json, if the approach works then it could be backported to 8.x-1.x.
Remaining tasks
Test thoroughly, especially on Windows machines.
User interface changes
none
API changes
none
Data model changes
none
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | revert-2911289-14.patch | 3.37 KB | junaidpv |
| #8 | 2911289-8.patch | 15.07 KB | mondrake |
| #8 | interdiff_5-8.txt | 2.59 KB | mondrake |
Comments
Comment #2
mondrakeComment #3
mondrakeMore elaborated patch, with tests.
Using the Symfony process component also allows us to set a timeout for the process, that is terminated when 60 seconds pass without response from the ImageMagick binary. Hopefully this addresses also the related issues that are about processes that pile up forever.
Tests are running fine on a TravisCI build on Trusty, both with Imagemagick and Graphicsmagick installed, https://travis-ci.org/mondrake/imagemagick/builds/279841170
Would be great to have feedback if this also works on Windows boxes.
Comment #4
mondrakeComment #5
mondrakeCode style cleanup (also #4)
Comment #7
mondrake#5 is green
Comment #8
mondrakeAdjusted tests to allow testing on Windows through AppVeyor https://ci.appveyor.com/project/mondrake/imagemagick/build/1.0.80
Comment #10
mondrakeCommitted to 8.x-2.x
Leaving open for a backport to 8.x-1.x
Comment #11
mondrakeNote to self: in next release mention the 60 sec timeout
Comment #12
mondrakeBackport is unlikely at this stage.
Comment #14
junaidpvImageMagick module causes to hang site when media entities are created as well as when uploading images in theme settings page.
I noticed image style images generation are very slow.
Also, we get lot of this warning with latest ImageMagic module 8.x-2.5:
Reverting changes in fixes all the issues I mentioned above.