<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Worker terminated due to reaching memory limit: JS heap out of memory]]></title><description><![CDATA[<p>We have deployed jsreport (4.10.1) on a dedicated VM in the Production environment.<br />
Configuration is as follows -<br />
RAM: <strong>32GB</strong><br />
CPU: <strong>4 Cores</strong><br />
Architecture: <strong>x64</strong><br />
(non-containerised)<br />
numberOfWorkers: <strong>1</strong></p>
<p>We keep getting <strong>Worker terminated due to reaching memory limit: JS heap out of memory</strong> once in a while. And it gets crashed and restarts after that.</p>
<p>Could you please let us know if we need to change any configurations or settings to avoid this issue?</p>
<p>Following is the error screenshot:<br />
<img src="/uploads/files/1761727029658-upload-8b6e3935-b88f-42f9-8f09-70edfa5b93f1-resized.png" alt="0_1761727027267_upload-8b6e3935-b88f-42f9-8f09-70edfa5b93f1" class="img-responsive img-markdown" /></p>
<p>Let us know if you need any additional details.</p>
<p>We have some queries:</p>
<p>Could you please let us know the default heap size?</p>
<p>How many percentage of RAM should be allocated to heap?</p>
<p>If we have set only one worker then why are we getting heap size limit issue?</p>
<p>Do references held by previous renders get freed up after report rendering finishes?</p>
<p>Please let us know so that we will be able to monitor and set appropriate configurations.</p>
]]></description><link>https://forum.jsreport.net/topic/3502/worker-terminated-due-to-reaching-memory-limit-js-heap-out-of-memory</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 15:48:05 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/3502.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 29 Oct 2025 08:38:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Worker terminated due to reaching memory limit: JS heap out of memory on Thu, 30 Oct 2025 07:07:35 GMT]]></title><description><![CDATA[<p>We have deployed jsreport (4.10.1) on a dedicated VM in the Production environment.<br />
Configuration is as follows -<br />
RAM: <strong>32GB</strong><br />
CPU: <strong>4 Cores</strong><br />
Architecture: <strong>x64</strong><br />
(non-containerised)<br />
numberOfWorkers: <strong>1</strong></p>
<p>We keep getting <strong>Worker terminated due to reaching memory limit: JS heap out of memory</strong> once in a while. And it gets crashed and restarts after that.</p>
<p>Could you please let us know if we need to change any configurations or settings to avoid this issue?</p>
<p>Following is the error screenshot:<br />
<img src="/uploads/files/1761727029658-upload-8b6e3935-b88f-42f9-8f09-70edfa5b93f1-resized.png" alt="0_1761727027267_upload-8b6e3935-b88f-42f9-8f09-70edfa5b93f1" class="img-responsive img-markdown" /></p>
<p>Let us know if you need any additional details.</p>
<p>We have some queries:</p>
<p>Could you please let us know the default heap size?</p>
<p>How many percentage of RAM should be allocated to heap?</p>
<p>If we have set only one worker then why are we getting heap size limit issue?</p>
<p>Do references held by previous renders get freed up after report rendering finishes?</p>
<p>Please let us know so that we will be able to monitor and set appropriate configurations.</p>
]]></description><link>https://forum.jsreport.net/post/14796</link><guid isPermaLink="true">https://forum.jsreport.net/post/14796</guid><dc:creator><![CDATA[jitendra5792]]></dc:creator><pubDate>Thu, 30 Oct 2025 07:07:35 GMT</pubDate></item><item><title><![CDATA[Reply to Worker terminated due to reaching memory limit: JS heap out of memory on Invalid Date]]></title><description><![CDATA[<p>See this config<br />
<a href="https://jsreport.net/learn/configuration#workers" rel="nofollow">https://jsreport.net/learn/configuration#workers</a><br />
<a href="https://nodejs.org/api/worker_threads.html#worker_threads_worker_resourcelimits" rel="nofollow">https://nodejs.org/api/worker_threads.html#worker_threads_worker_resourcelimits</a></p>
<blockquote>
<p>Could you please let us know the default heap size?</p>
</blockquote>
<p>These are the runtime/nodejs settings.<br />
Each thread gets the same default limit as the main thread<br />
~1.5 GB on 64-bit systems</p>
<blockquote>
<p>How many percentage of RAM should be allocated to heap?</p>
</blockquote>
<p>There is no rule of thumb, try what works best for you.<br />
The main thread can remain in default, and the rest can be divided among workers.</p>
<blockquote>
<p>If we have set only one worker then why are we getting heap size limit issue?</p>
</blockquote>
<p>Because every worker has the nodejs default limit.</p>
<blockquote>
<p>Do references held by previous renders get freed up after report rendering finishes?</p>
</blockquote>
<p>nodejs is the garbage-collected runtime. So it gets cleaned from memory when the GC gets triggered by the runtime.</p>
]]></description><link>https://forum.jsreport.net/post/14797</link><guid isPermaLink="true">https://forum.jsreport.net/post/14797</guid><dc:creator><![CDATA[admin]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Worker terminated due to reaching memory limit: JS heap out of memory on Wed, 11 Mar 2026 13:34:55 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>I’m experiencing a very similar issue, but specifically related to xlsx templates and different jsreport versions.</p>
<p>While testing, I noticed a significant performance difference between jsreport 2.11 and jsreport 4.12.</p>
<p>Starting from two clean images (fresh containers with default configuration), the execution time of the same xlsx template is much slower on 4.12 compared to 2.11. In our case this has a very negative impact on heavy customer reports, which are quite large.</p>
<p>With 2.11 the report completes successfully and relatively fast.<br />
With 4.12 the same report often ends up consuming much more memory and eventually the container crashes with:</p>
<p>Worker terminated due to reaching memory limit: JS heap out of memory</p>
<p>In production this becomes problematic because large reports can easily trigger an out-of-memory condition, while the exact same template works without issues on the older version.</p>
<p>The problem is very easy to reproduce using the official Docker images:</p>
<p>docker run -p 5488:5488 jsreport/jsreport:2.11.0<br />
docker run -p 80:5488 jsreport/jsreport:4.12.0</p>
<p>Running the same xlsx template on both instances clearly shows the difference in performance and memory usage.</p>
<p>I’ve prepared a minimal reproducible example starting from a simple Excel template, and I’m attaching a URL with the sample Excel file used for the test.<br />
File excel:<br />
<a href="https://docs.google.com/spreadsheets/d/1IKceiO1fEWLTqOKw2tzjdWNuls5In7uN/edit?usp=sharing&amp;ouid=105405265111194914502&amp;rtpof=true&amp;sd=true" rel="nofollow">https://docs.google.com/spreadsheets/d/1IKceiO1fEWLTqOKw2tzjdWNuls5In7uN/edit?usp=sharing&amp;ouid=105405265111194914502&amp;rtpof=true&amp;sd=true</a><br />
export:<br />
<a href="https://drive.google.com/file/d/18q2cVxPUBsn75Cd2-nZyu7XsZTMInpZ7/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/18q2cVxPUBsn75Cd2-nZyu7XsZTMInpZ7/view?usp=sharing</a></p>
<p>Also on chrome-pdf I have similar difference and a constant increasing of container memory even with the &quot;dedicated-process&quot; strategy.</p>
<p>Thanks!</p>
]]></description><link>https://forum.jsreport.net/post/14875</link><guid isPermaLink="true">https://forum.jsreport.net/post/14875</guid><dc:creator><![CDATA[l-dalleaste_lectra1]]></dc:creator><pubDate>Wed, 11 Mar 2026 13:34:55 GMT</pubDate></item><item><title><![CDATA[Reply to Worker terminated due to reaching memory limit: JS heap out of memory on Thu, 12 Mar 2026 11:00:10 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>In addition, here is a simple reproduction of the 'JS heap out of memory' error in the playground.</p>
<p>It loads a simple XLSX template having 3839 lines (1.1 MB) without any transformation nor templating tasks. Just print the template.</p>
<p><a href="https://playground.jsreport.net/w/jb-liger_lectra1/h4~axBkn" rel="nofollow">https://playground.jsreport.net/w/jb-liger_lectra1/h4~axBkn</a></p>
<p>Thanks for your help !</p>
]]></description><link>https://forum.jsreport.net/post/14881</link><guid isPermaLink="true">https://forum.jsreport.net/post/14881</guid><dc:creator><![CDATA[jb-liger_lectra1]]></dc:creator><pubDate>Thu, 12 Mar 2026 11:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to Worker terminated due to reaching memory limit: JS heap out of memory on Invalid Date]]></title><description><![CDATA[<p>We have fixed the performance regression issue for v2-based templates where there are no handlebars tags present in the xlsx file. In other words, for templates that use just xlsxAdd, xlsxMerge... transformations.</p>
<p>The fix is currently in the master branch waiting for the next release, however you can already test it in the docker nightly build</p>
<pre><code>docker run -p 5488:5488 jsreport/jsreport:nightly
</code></pre>
]]></description><link>https://forum.jsreport.net/post/14882</link><guid isPermaLink="true">https://forum.jsreport.net/post/14882</guid><dc:creator><![CDATA[admin]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>