JS report client timing out?

  • Hi,

    I'm using the jsreport-client node sdk (https://www.npmjs.com/package/jsreport-client) to connect to docker remote jsreport 2.11.0 on AWS ECS. For large reports, I see that the docker container finishes the rendering of the report in about ~9 minutes but the js report client never gets the response back. I've explicitly set the timeout for the client and the timeout for AWS load balancer is also set to 900 seconds.

    Here is the code that uses the client:

    const PdfGenClient = require('jsreport-client');
    class ReportProxy {
      static async generateReport(reportContext, secret) {
        const pdfGenClient = PdfGenClient(secret.baseUrl, secret.userName, secret.password);
        const response = await pdfGenClient.render(reportContext, { timeout: 9000000, maxBodyLength: Infinity, maxContentLength: Infinity });
        return await response.body();
    module.exports = ReportProxy;

    This is the last 2 logs I see on the docker container:

    2021-11-16T21:34:39.890Z - info: Rendering request 12 finished in 506572 ms
    2021-11-16T21:34:39.878Z - info: pdf-utils pdf processing was finished

  • That seems correct.

    I would recommend isolating the problem. If you run on prem jsreport locally, put there some kind of explicit delay for 9minutes to a template, and render it with the same client code, does it return properly?

Log in to reply

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