Nginx timeout error is not uncommon.
While running maintenance on few nginx servers i saw today error like this one, actually i saw it a lot of times but not on my configs. After digging around for a while i found out that this server could not respond in 60 seconds which is default. Nginx has a directive for read timeout and its call’s proxy_read_timeout, it determines how long will nginx wait until he receive response to a request. This actually is not permanent solution but it’s quick fix.