Error #137 when using Imagemagick

When rendering images in Phabricator, I get the following error message after about 15 seconds

Command failed with error #137! COMMAND convert ‘/tmp/d0x2l579eagckowk/24528-fMpC61’ -coalesce +adjoin ‘/tmp/d0x2l579eagckowk/24528-fMpC61’_’%09d’ STDOUT (empty) STDERR (empty)

Has anyone come across this before?

Which exact ImageMagick version do you use? Does this happen to all image types?