I just got the same error in my new server, if using PHP "new Imagick("$imagebath")"
the fix is:
set "php.ini" "memory_limit = 256M" (or more, it was 128, it's not enough), error log: "Out of memory in UB xxx: OOM killed process x (httpd)..." So the request was reset to browser.