Your web server is acting as a gateway or proxy and there was an issue with receiving an answer from the backend. This can also happen when your PHP configuration is wrong if you set up your own server.
How to fix:
Make sure your web server does not have any issues with connecting to it's backend. If you are using PHP-FPM, make sure it's running correctly and does not produce any errors.