Cómo resolver el error HTTP 502

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