After we deploy code to our "dev" Acquia environment we have a hook that flushes varnish for the domain there. Immediately after a domain purge all pages on the site come back with a 503 error. The error goes away after a refresh, but it was a pain for Acquia to debug because it wasn't producing any kind of error log. This error apparently is the result of the page not being entirely gzipped.

To resolve this temporarally we disabled the features of devel that would output in the footer as part of devel_shutdown_real.

Offending code:

function devel_shutdown_real() {
 ...
    if ($output) {
      // TODO: gzip this text if we are sending a gzip page.
      // See drupal_page_header().
      // For some reason, this is not actually printing for cached pages even
      // though it gets executed and $output looks good.
      print $output;
    }
 ...
}

Temporary solution:

drush <site-alias> dev_timer 0
drush <site-alias> devel_memory 0

Comments

heathdutton’s picture

Issue summary: View changes
moshe weitzman’s picture

I dont see why non gzipped content would give a 503 error. The server shouldnt care about the format of the contents.

That code comment does look ugly though.

heathdutton’s picture

It's an issue specifically for Varnish. I'm not sure what the reason is, but I've seem something similar happen in another non-Drupal project. Similar cause, something was being output that was not completely gzipped, even though headers stated that it was.

willzyx’s picture

Status: Active » Closed (outdated)

Closing for lack of activity. Feel free to reopen if the issue still exists