Discussion with Edu Obra (clicktek) how to handle magento timeouts 500,502 and 503. As per his experience there are sometimes this error code when the magento is in maintenance mode or server overload in magento.