nginx: separate upstream timeout from app errors
Access/error logs usually show whether upstream timed out or the app returned a real 5xx.
sudo tail -n 80 /var/log/nginx/error.log
curl -v --max-time 10 https://example.com/health
Verify the result
Timeouts in error.log mean proxy_read_timeout and upstream health need checking.