I'm also having the same problem since upgrading to PHP 5.4.
[Thu Aug 08 10:55:44 2013] [warn] [client 86.134.86.83] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Thu Aug 08 10:55:44 2013] [error] [client 86.134.86.83] Premature end of script headers...