Apache FastCGI:“(104)通过对等方重置连接:mod_fcgid:从FastCGI服务器读取数据时出错”

I have a problem with my Plesk server. When I execute a certain PHP File this error occures:

2018-08-06 23:12:11 Warning(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: 2018-08-06 23:12:11 Error End of script output before headers: mail.php, referer:

I have a nearly similar PHP file, but when executing this one no error occures. I've tried to set the permissions for the FastCGI execution according to this Plesk article: https://support.plesk.com/hc/en-us/articles/213941765-Webmail-is-not-functioning-Connection-reset-by-peer-mod-fcgid-error-reading-data-from-FastCGI-server

My PHP code uses the file_get_contents function and image creation with Imagick()

I recently installed all the software updates Plesk recommendet. The server is running Linux Ubuntu 14.04.5 LTS with Plesk Onyx 17.0.17 Update #54