I am not sure what service do you mean? The jsreportonline? Or do you mean your on prem jsreport installation?
If you use jsreportonlione, please email me what is your account(subdomain) name to support@jsreport.net.
The 504 Gateway Time-out is a web server timeout, not jsreport one. It means that the web server was waiting for response from jsreport, but it didn't response in time. You will find logs in app/logs for your on prem application. Or in the studio profiler in jsreportonliner.