Como resolver o erro HTTP 502?

I have not tried to build another server, but when I switch the server’s ram to 4GB, things get worse.