504 Gateway Time-out With Long Report (1000+ pageS)



  • Hi, I am getting a 504 Gateway Time-out error when sending a request with a large amount of data. As you can see I am posting to the JS Report Server using the .NET API. I tried using the Timeout property on RenderOptions, it didn't seem to help. I also tried to increase the reportTimeout as specified in my jsreport.config.json, that didn't seem to help either, any ideas?

    jsreport.Client.JsReportException: 'Unable to render template.  <html>
    <head><title>504 Gateway Time-out</title></head>
    <body>
    <center><h1>504 Gateway Time-out</h1></center>
    </body>
    </html>
    '
    


  • This seems to be an error from a webserver running in front of jsreport. Not from jsreport itself.
    Don't you have an nginx or something like that in your infrastructure?



  • Yes, I think you right, sorry!

    UPDATE: So I am posting 2.4 MBs of data to nginx. I have my client_max_body_size set higher than that so that is not the problem.

    Once I perform this post the server seems to go down on me. It takes a few minutes to happen, perhaps it's a RAM thing? I'll have to look into it more...



  • Hi Jan,

    So I think this may be a JS Report problem actually. I ran through increasing all the nginx timeouts with no luck, so I disabled nginx and ran it straight through to jsreport. I got a 504 Gateway Timeout. But then, I went a step further and replaced my sample document data in the web interface with what I'm trying to render. Lo and behold, I get a 504 Gateway Timeout in the web interface

    Any ideas?

    0_1626364941028_504error.png

    Thanks,
    Mike



  • How does your deployment work? Its some cloud service?
    The 504 error really most likely doesn't come from jsreport.
    This error typically means there is a proxy on the way, and the proxy responds with this because the service behind the proxy doesn't respond in time. There is no proxy inside jsreport.
    Try to run jsreport locally to be sure.
    Also please share the jsreport server logs.



  • OK, I've tried it locally and you are right it works without any issues.

    I am using Amazon Elastic Beanstalk and a modified jsreport Docker image.



  • I figured it out, I had to go under EC2 to Load Balancers and set the load balancer timeout to a higher value. Thanks for helping me troubleshoot!


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.