2.7.1 upgrade problem
I have been running 2.6.1 in a Docker image without problems for a long time. After upgrading to 2.7.1 and rebuilding my Docker image I got the following when I tried to start jsreport:
Has anything changed in 2.7 which I need to take into account in the config file or something?
Also, is there an upgrade guide for 2.6->2.7? I know some timeout params are deprecated.
If I downgrade to 2.6.1, everything works as usual again.
Hm. The docker 2.6.1 image uses the root user and 2.7.1 custom one.
That could maybe cause such a problem but we aren't able to replicate it.
Trying running docker with a mounted volume and then upgrade... everything works fine.
Trying multiple instances over the same data, also fine.
Please try to delete the
fs.lockfile if present and try again.
Note this file is present only in edge cases during the writes, so the most likely it won't be there and you just stop the container and run with the latest image.
I don't have any fs.lock file.
To ensure that I really did a complete rebuild of the image, I did the following (dco = docker-compose)
dco stop jsreport dco rm jsreport dco build jsreport dco up jsreport
Here is my Dockerfile
FROM jsreport/jsreport:2.7.1 COPY license-key.txt /app COPY ./mounted/jsreport.config.json /app COPY ./mounted/data /app/data ENV templatingEngines:strategy in-process ENV node --max-old-space-size=3072 RUN cd /app && npm install \ moment \ moment-timezone \ intl \ handlebars-helpers \ node-fetch \ jsreport-assets \ jsreport-static-pdf \ i18next
Thank you, I see...
Because we now run jsreport with the custom user, you need to explicitly use it when calling
COPY --chown=jsreport:jsreport license-key.txt /app COPY --chown=jsreport:jsreport ./mounted/jsreport.config.json /app COPY --chown=jsreport:jsreport ./mounted/data /app/data
Unfortunately, docker doesn't use the current user automatically, so you need to be explicit this way.
Let us know if you know how could we improve this. Except for docs :)
Your solution works great.
I couldn't find any upgrade guides for 2.7. Do you have a link for such a document?
I know I need to replace some timeouts with the new timeout setting, but I'm also wondering if anything else needs to be changed.
I think I found the information I was looking for:
BTW, the new font handling in 2.7 is great for my use. We are embedding about 4-5 typefaces in the PDFs. I just rendered one of our more complex reports. The resulting PDF is 266 pages.
File size 2.6.1: 46 MB
File size 2.7.1: 20 MB
I'm storing render times in my report log, so I could go back and compare. This particular report took about 75 seconds to render with 2.6. With 2.7 it took 60 seconds. So, this report is about 20% faster with 2.7.
I'll make some tests regarding memory consumption and get back to you in this thread: