PhantomManager Timeout Issue



  • When i am processing a large payload i am getting a timeout error from JS Reports.Below is what i get:
    Timeout
    Error: Timeout at /home/app/node_modules/phantom-workers/lib/phantomManager.js:117:29 at /home/app/node_modules/phantom-workers/lib/phantomWorker.js:120:13 at /home/app/node_modules/phantom-workers/lib/phantomWorker.js:136:20 at Socket.
    To solve this i tried increasing the timeout in 2 ways:
    1.Inside the properties of the template i increased the resourceTimeout of phantom pdf.It was 1000ms i increased that to higher values still the timeout issue was not solved.
    2.I added the phantom object in the payload of the post call and added the resourceTimeout attribute inside it with a higher value.Still the issue was not resolved.
    Now i am not sure where should i change regarding this.I am using phantom pdf 1.9.8.Can i have some help on this.



  • What is your jsreport version?
    You should use the reportTimeout config with the latest jsreport.

    Note phantomjs project is archived. You should migrate to the chrome-pdf project.
    https://jsreport.net/learn/chrome-pdf



  • Thank you for the response.But couple of questions.In the error message it says it is related with phantomManager.js and that is the reason i started checking things related with phantom-pdf and how can we get the jsreport version that is being used.Because i think we are not using the latest one.In the template settings i can find that the recipe used is phantom-pdf.



  • The reportTimeout is a general config that is used also by a phantom in the latest version.

    You can see the individual configs for phantom here
    https://jsreport.net/learn/phantom-pdf#configuration



  • My issue seems very similar to
    https://forum.jsreport.net/topic/311/timeout-error-or-return-blank-sub-reports/10.
    Here you have mentioned to increase the phantom js timeout.Where exactly you referred to increase it.Is it possible i can pass these configurations as part of payload of the post call in jsreports like
    "data": {
    "template": {
    "shortid": TemplateId,
    "phantom": {
    "resourceTimeout":90000000,
    }
    },
    "data": reportData,
    "options": {
    "language": locale,
    "timeout": 90000000
    }
    },
    "headers": {
    "Content-Type": "application/json"
    }
    };


Log in to reply
 

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