Varnish Guru Meditation
I had a problem where a Rails application communicated with a third-party API (Dropbox) to do some actions. The request would take significantly more time than a regular request, lasting for more than 15 second easily (fetching numerous directories and files).
Your browser won’t timeout on such requests, but in my case, Varnish was. It would serve me with the following message:
Clearly this is a safeguard of Varnish. It’s easy to fix this with a settings change in your ‘vim /etc/varnish/default.vcl’ file.