Minimalist setup on jsReport, do you have samples?



  • I just to want generate pdf from the handlebars templates that i have. I want it to be fast and minimalist, that is is why strategy is in-process and number of workers is 12. I don't want other extension and packages that was included on main jsreport package.

    If i just use jsreport-core, and fill up template.content with the value that was stored on my file how can i load the external css?

    If i want to load the template from file storage (which is report-builder folder) from the image below, it always get error message, cannot find the template or no permission to read the template. I'm not sure how I can setup the fs-store, but whenever i copy the templates and data from my existing jsReport instance online, i got that error.

    i initially uses this codes like this

    const dataDirectory = path.join(__dirname, 'report-builder')
      console.log(dataDirectory)
    
      jsReport = jsReportCore({
        loadConfig: false,
        dataDirectory,
        connectionString: { 'name': 'fs' },
        templatingEngines: {
          numberOfWorkers: 12,
          strategy: 'in-process',
          templateCache: {
            max: 100,
            enabled: true
          }
        }
      })
    
      jsReport.use(jsReportChromePdf())
      jsReport.use(jsReportHandlebars())
      jsReport.use(jsReportFsStore())
      jsReport.use(jsReportTemplates())
    

    0_1561380683655_upload-5bf3591a-8711-410f-b382-14b90d8fb427


  • administrators

    hi! it looks like your configuration is using the old and new format at the time. connectionString is configuration for jsreport v1, the new configuration is: store: { provider: "fs" } . also the dataDirectory should be specified as part of fs-store extensions options as you can see here:

    "extensions": { "fs-store": { "dataDirectory": "data/folder/path" } }



  • Change that.. does not helped. I'm still getting the template does not exist issue..

    I tried to export the files from my running jsreport instance and extract it locally. Now i have this files and folders but all of them are json.. I'm expecting it to have the handlebars files. Maybe the reason why the issue about the template does not exists because my "data" folder (which is the default folder name now of my fs-store datastorage) does not really exists. I created the folder and just copy the files manually and still does not work.

    Maybe there is something wrong with the configuration of folders like missing config.json or something just like the documents said. i'm not just sure who is this metadata being structured. Or can i have a way to just copy the handlebar templates from my server and paste it here and it should work. I thought fs-storage should be easy


  • administrators

    I tried to export the files from my running jsreport instance and extract it locally. Now i have this files and folders but all of them are json.. I'm expecting it to have the handlebars files.

    when you export something into a zip file, the files inside there are expected to be used with the import functionality, not for your direct consumption because the content there is not designed for you to copy/paste. what you should do is to start jsreport with fs store as your store provider and with both the studio and the import-export extension enabled, then import the zip file that you have, after that you will have the entities inside that zip inside your local data folder. then you can disable the studio and the import-export again if you want (you only need to enable it for the import)



  • import jsReportChromePdf from 'jsreport-chrome-pdf'
    import jsReportCore from 'jsreport-core'
    import jsReportFsStore from 'jsreport-fs-store'
    import jsReportHandlebars from 'jsreport-handlebars'
    import jsReportTemplates from 'jsreport-templates'
    
    export let jsReport = null
    export const setupJsReport = (express) => {
    
      jsReport = jsReportCore({
        loadConfig: false,
        templatingEngines: {
          numberOfWorkers: 12,
          strategy: 'in-process',
          templateCache: {
            max: 100,
            enabled: true
          }
        }
      })
    
      jsReport.use(jsReportChromePdf())
      jsReport.use(jsReportHandlebars())
      jsReport.use(jsReportFsStore({ dataDirectory: 'jsreport-data' }))
      jsReport.use(jsReportTemplates())
    
      return jsReport.init()
    
    }
    

    Yeah i figured that out, so i get the files with tons of config.json and paste that to jsreport-data folder as shown in this image, but still got this template does not exists issue.

    0_1561396314106_upload-6cd0e15d-9569-4459-91af-96c27f2a98ee

    My package.json uses

       "jsreport-chrome-pdf": "^1.4.0",
        "jsreport-core": "^2.5.0",
        "jsreport-fs-store": "^2.4.1",
        "jsreport-handlebars": "^2.0.2",
        "jsreport-templates": "^2.2.0",
         "puppeteer": "^1.18.0",
    

  • administrators

    i don't see in your code that you are configuring the fs-store as your store provider, you are registering the fs-store extension (with .use) but you are not configuring the instance to use it, you should update your code to include store: { provider: "fs" } in the config.

    export const setupJsReport = (express) => {
    
      jsReport = jsReportCore({
        loadConfig: false,
        // YOU SHOULD ADD THIS LINE
        store: { provider: 'fs' },
        //
        templatingEngines: {
          numberOfWorkers: 12,
          strategy: 'in-process',
          templateCache: {
            max: 100,
            enabled: true
          }
        }
      })
    
      jsReport.use(jsReportChromePdf())
      jsReport.use(jsReportHandlebars())
      jsReport.use(jsReportFsStore({ dataDirectory: 'jsreport-data' }))
      jsReport.use(jsReportTemplates())
    
      return jsReport.init()
    
    }
    

    you are getting cannot find the template or no permission to read the template because you are not specifying which the store provider to use.. so then it defaults to the "memory" store which does not read from your jsreport-data folder.



  • Wow.. you're the best!

    I was able to get a render the pdf now. But the rendered pdf are clumsy, all images and css are are not available, maybe because of assets extension is not installed?

    It renders fine on the studio but not with this minimalist setup!



  • Yep, figured that out. the assets extension are missing, just installed and used it and it should be fine. Thanks to you @bjrmatos ..
    I will create a blog about this setup maybe, somebody who want to integrate the jsreport on their nodejs app with minimalist setup, just to render pdf, it will help.


  • administrators

    Yep, figured that out. the assets extension are missing, just installed and used it and it should be fine. Thanks to you @bjrmatos ..
    I will create a blog about this setup maybe, somebody who want to integrate the jsreport on their nodejs app with minimalist setup, just to render pdf, it will help.

    yes, thanks for that. i'm sure it will be helpful for other people, we try to focus on content for the main jsreport package because it is the easiest way to get started. but maybe in future we will include some guide for this minimalist setup case.



  • I thought getting the minimalist setup will have impact on performance of jsreport. But i did load test my app using jmeter, with just 100 virtual users, but after 800 samples, it dies and start getting errors like this

    0_1561400006094_upload-4b1ed91d-e126-4d5a-a010-9ed2487b36b8

    I have alienware laptop m15x, so my resources for cpu and memory should be enough. But this pdf rendering is slow. Is there away to speed this up.

    here is the complete error dump from my terminal

    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    ERROR: The process with PID 25904 (child process of PID 10988) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 14896 (child process of PID 13356) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 37764 (child process of PID 8416) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 15620 (child process of PID 17084) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 37044 (child process of PID 18348) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 38012 (child process of PID 32380) could not be terminated.
    Reason: There is no running instance of the task.
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added. Use emitter.setMaxListeners() to increase limit
    (node:11536) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
    ERROR: The process with PID 22712 (child process of PID 13968) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 43600 (child process of PID 40008) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 26804 (child process of PID 23212) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 42208 (child process of PID 35392) could not be terminated.
    Reason: There is no running instance of the task.
    ERROR: The process with PID 12348 (child process of PID 42096) could not be terminated.
    Reason: There is no running instance of the task.
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Failed to launch chrome!
    [0625/020506.086:FATAL:feature_list.cc(237)] Check failed: !g_initialized_from_accessor.
    Backtrace:
            ovly_debug_event [0x00007FFE6246D512+15381554]
            ovly_debug_event [0x00007FFE6246CAF2+15378962]
            ovly_debug_event [0x00007FFE62480413+15459123]
            ovly_debug_event [0x00007FFE6246F55E+15389822]
            ovly_debug_event [0x00007FFE61D0FF71+7659153]
            ovly_debug_event [0x00007FFE623EAB21+14846529]
            ovly_debug_event [0x00007FFE623EAA8A+14846378]
            ovly_debug_event [0x00007FFE62415958+15022200]
            ovly_debug_event [0x00007FFE623EA332+14844498]
            ovly_debug_event [0x00007FFE62414DE6+15019270]
            ovly_debug_event [0x00007FFE62414CBE+15018974]
            ovly_debug_event [0x00007FFE62414AF4+15018516]
            ChromeMain [0x00007FFE615C11B6+286]
            Ordinal0 [0x00007FF6D6862767+10087]
            Ordinal0 [0x00007FF6D686182B+6187]
            GetHandleVerifier [0x00007FF6D6964AD2+663890]
            BaseThreadInitThunk [0x00007FFEE3DF4034+20]
            RtlUserThreadStart [0x00007FFEE5FC3691+33]
    
    
    
    TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
    
        at onClose (C:\Apps\gitlab.com\pantas.web\node_modules\puppeteer\lib\Launcher.js:340:14)
        at ChildProcess.helper.addEventListener (C:\Apps\gitlab.com\pantas.web\node_modules\puppeteer\lib\Launcher.js:330:60)
        at emitTwo (events.js:131:20)
        at ChildProcess.emit (events.js:214:7)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    ERROR: The process with PID 29632 (child process of PID 42520) could not be terminated.
    Reason: There is no running instance of the task.
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Error: Timeout during waiting for file system, try it again later.
        at Object.rejectItemsWithTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-fs-store\lib\queue.js:53:23)
        at Timeout.persistenceQueueTimeoutInterval.setInterval [as _onTimeout] (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-fs-store\lib\provider.js:322:73)
        at ontimeout (timers.js:482:11)
        at Timer.unrefdHandle (timers.js:595:5)
        at Object.push (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-fs-store\lib\queue.js:32:22)
        at Cursor.cursor.toArray (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-fs-store\lib\provider.js:104:39)
        at replay (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-core\lib\store\collection.js:48:21)
        at listenerPromise.then (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-core\lib\store\collection.js:55:50)
        at runCallback (timers.js:794:20)
        at tryOnImmediate (timers.js:752:5)
        at processImmediate [as _immediateCallback] (timers.js:729:5)
    From previous event:
        at evaluateAssets (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-assets\lib\assets.js:66:24)
        at Object.reporter.beforeRenderListeners.insert (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-assets\lib\assets.js:372:34)
        at <anonymous>
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (C:\Apps\gitlab.com\pantas.web\node_modules\jsreport-chrome-pdf\lib\conversion.js:192:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)
    
    Process finished with exit code 1
    

    i'm more concerned about this memory leak message. Am i doing wrong about this rendering or maybe there is some issue about the jsreport rendering, or maybe there is a setting to tweak for it.


  • administrators

    hmm i'm not sure if you are ensuring a singleton for your jsreport instance so far the code that you shared makes me think that you are creating a jsreport for each render, which is bad.

    the best will be that on the entry point/startup of your application you initialize jsreport once wait until is ready, and then just pass the jsreport instance to your methods, in this way you don't need to think about checking if the instance is initialized or not per render, it will always be initialized at the time your app is started.



  • Im sure this is is a singleton. Only one instance of jsReport is running, i even put this on global object of nodejs to make sure i did the init once and just re-use the same instance of jsReport. It will be hard to scale up jsReport, with this 800 samples on 100 virtual users it dies.. I thought there is a separate process for running the renderer, it even have a poor thoughput, with 1 operation per minute!! Remember my machine is alienware, a gaming laptop with huge memory and cpu. So this operation and performance is very poor on my setup.. Not sure what is the problem


Log in to reply
 

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