Help! Craft issues after changing PHP version
Had this happen. I believe the cause is twofold:
FastCGI's -idle-timeout is set too low.
Craft is still writing to the log but Apache cuts it off since it hasn't sent the actual data yet. That's what the incomplete headers means.
You'll might find a line like this in your config:
FastCgiServer /dev/shm/cadexdev-php.fcgi -idle-timeout 10

Some hosts might set it low, like 10 seconds. That could be fine for production to make sure scripts don't take a super long time, but as you've discovered devMode could take a little longer to run, depending on the case.
RunTasksAutomatically
The other piece is Craft does things in the background. Craft's documentation on runTasksAutomatically says:

This setting should be disabled for servers running Win32, or with Apache’s mod_deflate/mod_gzip installed, where PHP’s flush() method won’t work.

Some of those tasks clear caches and stuff. If they don't run, you'll get weird intermittent performance issues. Turn it off and run a cron job on your server periodically. We run php-fpm on both Apache and nginx and FWIW, we don't have this issue on nginx.
Increase PHP's memory
You'll also get a 500 / incomplete headers error if PHP dies because of lack of memory.