Javascript Aggregator (contrib) makes Varnish serve 503s. Why?

Events happening in the community are now at Drupal community events on www.drupal.org.
perandre's picture

After struggling with Varnish error messages, I found that simply disabling javascript_aggregator module solved it. I really benefit from minified js, though, so I'm eager to learn why this happens. Any thoughts?

Comments

Does the file extension come

Dokuro's picture

Does the file extension come out as js.gz?

Not, min.js.

perandre's picture

Not, min.js.

Per André Rønsen | Front | Twitter: @perandre

What was the Varnish error

vacilando's picture

What was the Varnish error message you were seeing and which disappeared?


---
Tomáš J. Fülöpp
http://twitter.com/vacilandois

It was the standard 503 error

perandre's picture

It was the standard 503 error set by the Mercury installation:

Page Could Not Be Loaded

We're very sorry, but the page could not be loaded properly. This should be fixed very soon, and we apologize for any inconvenience.


Debug Info:

Status: "} obj.status {"
Response: "} obj.response {"
XID: "} req.xid {"

Varnish

Per André Rønsen | Front | Twitter: @perandre

Shot in the dark

Dokuro's picture

Shot in the dark here, but try this:

sudo nano /etc/varnish/default.vcl

Inside of :

sub vcl_recv {

Add:

  if (req.url ~ ".js") {
    return (pipe);
  }

Restart Varnish:
sudo /etc/init.d/varnish restart

See if that might work?

Thanks, I'll try that right

perandre's picture

Thanks, I'll try that right after today's meetings.

Per André Rønsen | Front | Twitter: @perandre

re: Thanks, I'll try that right

Greg Coit's picture

Please let the group know how it goes.

Thanks!

Greg

--
Greg Coit
Systems Administrator
http://www.chapterthree.com

I inserted if (req.url ~

perandre's picture

I inserted

if (req.url ~ ".js") {
return (pipe);
}

into the proper section of /etc/varnish/default.vcl, restarted varnish, enabled javascript_aggregator, ran drush cc all, and....no success. The site (including admin) tries to load a page for a while before it serves a 503.

Per André Rønsen | Front | Twitter: @perandre

Don't shoot the pianoplayer

perandre's picture

Update: It's not a Varnish issue! It's just that with Varnish running, I actually get an error message.

Without Varnish, siteload is incredibly slow (the page may or may not load).

Per André Rønsen | Front | Twitter: @perandre

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: