Error 503 Backend fetch failed (Ubuntu 20.04 + Apache2)

Hi everybody, I have a problem with my first droplet (Magento 2). [Magento 2 Open Source 1.3.1 on Ubuntu 20.04 (LTS)]

I was following the complete process as described and Magento 2 was successfully installed (at least it has displayed the message in the console).

After entering my IP or via A-Record set domain address in the browser, I’m getting a 5XX error.

To be precise this is the error inside the browser window:

*Error 503 Backend fetch failed Backend fetch failed

Guru Meditation: XID: 32774

Varnish cache server*

Sadly I haven’t found anything like that to resolve this problem. Apache2 is running and it seems that there are no problems, as well as MySQL.

I haven’t changed other things on the server, just restarted (successfully) both services and the whole droplet.

Does anyone has ideas or can help me? I would really appreciate it.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, I got exactly the same error. I tried to increase the http_resp_hdr_len and http_resp_size in Varnish. Also tried different Maintenance mode. I enabled and disabled it, but in any mode this error remained. Then i tried change url to health_check.php in Varnish configuration file in /etc/varnish/default.vcl but it also didn’t help.

But, when i tried restart apache2 by "sudo service apache2 restart" i got message: `Job for apache2.service failed because the control process exited with error code.

See “systemctl status apache2.service” and “journalctl -xe” for details.`

Both commands from that message to say to me that apache2 can’t run because: "SSLCertificateFile: file '/etc/letsencrypt/live/magento.plugin/fullchain.pem' does not exist or is empty"

And in “/etc/letsencrypt” is no mention about “/live” folder. So in my case problem could be in the lack of files in that folder.

Could somebody help me with apache2 and that files which is not exist?

Hi @cryptogene,

The issue is with Varnish rather than Apache. You need to increase the http_resp_hdr_len and http_resp_size in Varnish.

You can edit these configuration settings in your Varnish config file. You can find the file at /etc/default/varnish. Edit the file and restart the service

service varnish restart

This should resolve your issues.