Here's how to fix it, FWIW. This is a repair at the site admin level, not something you can do on your individual desktop or laptop folks.
https://asdqwe.net/blog/solutions-504-gateway-timeout-nginx/
https://asdqwe.net/blog/solutions-504-gateway-timeout-nginx/