Chrome Process not closing after use



  • How to configure jsreport to close the not use chrome process, because after the report generation, the chrome is not closing.

    0_1701779901657_upload-d28c963e-e54e-44f8-911b-7b36f2064ce3

    Config:
    {
    "httpPort": 5488,
    "store": {
    "provider": "fs"
    },
    "blobStorage": {
    "provider": "fs"
    },
    "logger": {
    "console": {
    "transport": "console",
    "level": "debug"
    },
    "file": {
    "transport": "file",
    "level": "info",
    "filename": "logs/reporter.log"
    },
    "error": {
    "transport": "file",
    "level": "error",
    "filename": "logs/error.log"
    }
    },
    "profiler": {
    "maxProfilesHistory": 100
    },
    "allowLocalFilesAccess": true,
    "trustUserCode": true,
    "reportTimeout": 300000,
    "workers": {
    "numberOfWorkers": 4
    },
    "templatingEngines": {
    "numberOfWorkers": 4,
    "strategy": "http-server",
    "timeout": 30000
    },
    "chrome": {
    "numberOfWorkers": 4,
    "strategy": "chrome-pool",
    "timeout": 30000,
    "launchOptions": {
    "args": ["--no-sandbox"]
    }
    },
    "extensions": {
    "authentication": {
    "cookieSession": {
    "secret": "NKG8FSUozjlLD1e2"
    },
    "admin": {
    "username": "admin",
    "password": "Admin@2023"
    },
    "enabled": true
    },
    "sample-template": {
    "createSamples": false
    },
    "scripts": {
    "strategy": "http-server",
    "timeout": 30000
    },
    "assets": {
    "searchOnDiskIfNotFoundInStore": false,
    "publicAccessEnabled": true,
    "allowedFiles": "/."
    },
    "chrome-pdf": {
    "timeout": 30000
    }
    }
    }



  • You use 4 worker threads and 4 chrome workers. Therefore you have 16 Chrome instances running... Sometimes it's even doubled because Chrome uses another supervisor process...

    If you don't won't to reuse existing chrome instances, you should use configuration chrome.strategy=dedicated-process.
    https://jsreport.net/learn/chrome-pdf#chrome-process-allocation



  • Ok, what is the recomendation?

    I see chrome-pool as a good strategy.

    Here i See exactly 80 chrome process running.



  • Try it with the default

    "chrome": {
    "numberOfWorkers": 1,
    "strategy": "chrome-pool",
    }
    

    For me on Windows, chrome creates 5 processes per worker then.
    If it bothers you, go with dedicated-process strategy.



  • Tks, I will try it.

    And it

    "templatingEngines": {
    "numberOfWorkers": 4,
    "strategy": "http-server",
    "timeout": 30000
    },

    WHat is the recomendation?



  • That is jsreport v2 configuration having no impact on >=3.0.0



  • Tks for the information.

    Have a nice day,


Log in to reply
 

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