Drupal - error 500: Premature end of script headers: index.php

@mcaleaa answer helped me on an acquia based site. To fix it I commented out the following lines in development.services.yml:

parameters:
  http.response.debug_cacheability_headers: true

In case this helps anyone: I encountered this error on my local site's front page, just after following the instructions here https://www.drupal.org/node/2598914 (Disable Drupal 8 caching during development)

When I once again commented out this line in my settings.local.php, the 500 error went away:

# $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';

I suspect that my site's front page is heavily dependent on the cache entries, and when I switch to the null cache, the page is simply having trouble getting built. That's my guess.


This is not "solve it all" answer, but it may help those who use Acquia. The problem went away after switching from Fast CGI (mod_fcgid) to Apache module (mod_php) in Acquia DevDesktop->Preferences->Config.

Just some env notes for future debugging:
Acquia DevDesktop 2 rev:39801a8
PHP version 7.2.9

Tags:

Http Request

8