chrome processes always running ?
-
Hi
New to jsreport, loving the work you guys have done :-)
I am using jsreport 4.7.0.
Once a report is finished running i have noticed that there are still chrome processes running, is this normal to always have chrome running ?
When i stop the server the processes remain and this is where it becomes a bit of an issue. Starting the server again results in a new set of chrome processes.
Is there a best way to shutdown / restart ?
In testing i am running with jsreport start. When we plan to go to production i will run server.js.
Thanks
-
It appears to be increasing every time i run a report.
Is this normal ?
-
jsreport by default keeps a pool of running Chrome processes. If you want to close the chrome processes after the rendering, you can use
dedicated-process
strategy.In every case, all chrome processes should be closed after the jsreport is closed.
This doesn't happen? What OS and jsreport installation do you use?
-
I am using Macos 15.4 and Freebsd 13.3-RELEASE. Freebsd is using ungoogled-chromium.
-
rsreport 4.7.0 and jsreport-cli 4.1.0
-
I have a similar problem. After some days we have about 300 chrome processes running.
We use the single file executable version of jsreport 4.8.0. It is configured as a service with NSSM. After a restart of the service, the processes dissapear. But after some days we have several hundred preocesses again.
-
I've tried the following...
- Windows 11 OS
- Download 4.8.0 jsreport.exe binary https://github.com/jsreport/jsreport/releases/tag/4.8.0
- Download nssm 2.24 x64 exe binary
- Place both to the same dir
- run
nssm install jsreport
- in the form I fill path to the dir and add
start
argument - I open the studio localhost:5488 and let it create sample reports
- Then I render in the loop 1000 reports
const client = require('@jsreport/nodejs-client')('http://localhost:5488') async function run () { for (let i = 0; i < 1000; i++) { await client.render({ template: { name: 'invoice-main' } }) console.log('rendered', i) } } run().then(() => console.log('done')).catch(err => console.error(err))
In the taskmanager I see ~ constant number of chrome processes
The default number of worker threads jsreport uses is 2. Therefore, I see 2 main chrome processes and several nested chrome processes which chrome uses. If you use the same approach, do you get different observations?
Note if you want to let jsreport close the chrome processes after every render, you can create file
jsreport.config.json
and add the following{ "chrome": { "strategy": "dedicated-process" } }
-
When i first tested I was using 4.7.0, I just tested again with 4.8.0 and the issues are no longer there.
Thanks