Troubleshooting 502 and 504 Errors