17

My online whiteboard application has been working previously, but for whatever reason, it no longer works. Now it shows a 503 Varnish cache error as seen here: http://grab.by/eFHG

Do you happen to know where I should start to look to try to resolve this issue?

Thanks! Donny

Donny
  • 955
  • 3
  • 14
  • 19
  • 1
    Did you find out the reason why your app was throwing 503? – Joel Handwell Jun 24 '14 at 00:13
  • I've been getting this `Error 503 Backend fetch failed` error frequently on my Cloudways server. I will probably try this soon: https://community.cloudways.com/t/many-error-503-backend-fetch-failed/343/4 – Ryan Feb 10 '18 at 23:12
  • Please update the address since that address doesn't anymore lead to the error page. Using a link to a screenshot image would be much better now. Fastly CDN failure generated a large number of varnish error screenshots e.g. in Twitter. – Ville Laitila Jun 08 '21 at 17:58

3 Answers3

15

This error means that Varnish had no response (even not an HTTP error) from the backend within the timeout limit.

You can troubleshoot that in many ways :

  • On the backend : do you see requests from Varnish in your webserver log ?

  • On Varnish server : Run varnishlog and check the request process. You should have events in this order : RxRequest > TxRequest > RxResponse > TxResponse. Your problem is between TxRequest (request sent to backend) and RxResponse (response received from backend).

  • On your Varnish server try connecting on the backend using telnet (telnet ). Does it connect ? If it does, try sending a request (e.g. "GET / "). Do you receive a response ?

Probable causes could be : firewall/selinux blocking between varnish & backend, bad varnish or backend web server config (are backend address & port sync ?), webserver stopped, ...

  • I found this occurred after a full stack restart. After restarting varnish on it's own after the stack it was fine – sidonaldson Mar 10 '16 at 12:31
6

You could always check your /etc/varnish/default.vcl (CentOS).

backend default {
  .host = "127.0.0.1";
  .port = "80";
}

Make sure the .host value is your server IP Address, and change the port to 8080, and adjust your port setting in /etc/httpd/conf/httpd.conf and make sure Apache listen to 8080.

EDIT
It could also mean web server (Apache) have wrong/default settings.

  • Check the virtual host ports, the values might be 80, they should be 8080.
  • Check Listen directive and ServerName, they must have 8080 port.
  • Make sure you do sudo systemctl enable varnish.
  • And for the final touch, do sudo reboot (cache programs are bugging me in the development state).
John Smith
  • 337
  • 1
  • 3
  • 12
0

When I tried to reach this page today, I got shown the error page instead with following contents:

Error 503 Service Unavailable
Service Unavailable

Guru Mediation:
Details: cache-hel6832-HEL 1623148717 170212118

So it seems StackOverflow is also using a CDN that was failing today, and the failure was impacting huge number of services at the same time. In these kind of situations, we might be at the mercy of external CDN provider. Today showed us that sometimes the only thing that you can do, is to wait for the others to solve it for you. Luckily these kind of outages are shortlived.

Suitable long term strategy is to use several CDN services instead of single.

Ville Laitila
  • 1,187
  • 11
  • 18