I would like to know what customizations in jsreport.config.json have you done except the mongo store?
This is the prod configuration:
{
"certificate": {
"key": "certificates/jsreport.net.key",
"cert": "certificates/jsreport.net.cert"
},
"httpPort": 3001,
"httpsPort": null,
"logger": {
"console": {
"transport": "console",
"level": "debug"
},
"error": {
"transport": "console",
"level": "error"
}
},
"blobStorage": {
"provider": "gridFs"
},
"store": {
"provider": "mongodb"
},
"phantom": {
"defaultPhantomjsVersion": "2.1.1",
"numberOfWorkers": 2,
"strategy": "phantom-server",
"timeout": 60000
},
"allowLocalFilesAccess": false,
"templatingEngines": {
"strategy": "http-server",
"numberOfWorkers": 4,
"timeout": 1800000,
"allowedModules": "*"
},
"chrome": {
"timeout": 40000,
"strategy": "chrome-pool",
"numberOfWorkers": 4,
"launchOptions": {
"args": "--no-sandbox"
}
},
"extensions": {
"mongodb-store": {
"uri": "<mongouri>",
"prefix": "jsreport_"
},
"authentication": {
"cookieSession": {
"secret": "<secret>"
},
"admin": {
"username": "<user>",
"password": "<psw>"
}
},
"scripts": {
"allowedModules": "*",
"timeout": 1800000
},
"sample-template": {
"createSamples": true
},
"chrome-pdf": {
"timeout": 40000,
"strategy": "chrome-pool",
"numberOfWorkers": 4,
"launchOptions": {
"args": "--no-sandbox"
}
}
}
}
What version of jsreport do you use?
Those are the version of the packages:
"jsreport": "2.6.1",
"jsreport-chrome-pdf": "1.6.1",
"jsreport-client-app": "^0.1.1",
"jsreport-fs-store": "2.6.0",
"jsreport-import-export": "1.4.0",
"jsreport-mongodb-store": "1.2.2",
"jsreport-pdf-utils": "1.5.2",
"jsreport-phantom-pdf": "2.2.0",
"jsreport-studio": "2.6.6",
Is it xlsx recipe or html-to-xlsx recipe you use?
The recipe is xlsx, with a custom xslx template used for every excel reports. For pdf reports we always use chrome-pdf (on jsreport settings you'll see phantom just for legacy reports on other customers, but it's not used here)
Do you run jsreport inside docker or it runs directly?
jsreport starts in a docker, with the starting script that just set some env variable and calls jsreport.init()
Do you persist outputs using reports extension?
No, we'll use an API request to create the report using jsreport, then it send back the b64 and we save the pdf in a different folder using a fs.writeFileSync(tmpName, (new Buffer(report, 'base64')).toString('binary'), 'binary');
Can't your code in script or templating engine memory leak? In case you use http-server strategy.
That was our first thought, in fact, we have worked considerably to make a general review for memory leak, but despite this we can not understand why this trend in memory. The strategy is included on the conf that is published before:
"templatingEngines": {
"strategy": "http-server",
"numberOfWorkers": 4,
"timeout": 1800000,
"allowedModules": "*"
},
We could try to change the strategy to the dedicated-process to see if something change.
Thank you for your support; we will stay in touch with you for any further reports or updates.