I had an address with bad characters that was throwing an error, I boiled it down to the minimum characters to consistently get the error:
https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=pjso...
This request will run for 4 seconds then return a 504 gateway timeout, consistently, not intermittently