<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nodejs on cassiobotaro</title><link>https://cassiobotaro.dev/en/tags/nodejs/</link><description>Recent content in Nodejs on cassiobotaro</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 25 Jul 2026 13:06:19 -0300</lastBuildDate><atom:link href="https://cassiobotaro.dev/en/tags/nodejs/index.xml" rel="self" type="application/rss+xml"/><item><title>How I detected a memory leak in Node.js with heap snapshots</title><link>https://cassiobotaro.dev/en/posts/detecting-a-memory-leak-in-nodejs/</link><pubDate>Wed, 01 Apr 2026 00:00:00 +0000</pubDate><guid>https://cassiobotaro.dev/en/posts/detecting-a-memory-leak-in-nodejs/</guid><description>&lt;p&gt;&lt;img src="https://cassiobotaro.dev/images/leak.png" alt="Leak"&gt;&lt;/p&gt;
&lt;p&gt;I recently had to investigate a strange memory growth in a real project. The behavior did not show up in development, but it blew up under load. I put together a minimal example that reproduces the scenario. More important than memorizing the fix is understanding the process: if you know how to repeat this flow, you will be able to investigate similar problems with much more confidence.&lt;/p&gt;
&lt;h2 id="the-symptom"&gt;
 The symptom
 &lt;a class="heading-link" href="#the-symptom"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The endpoint fetched data with Sequelize, enriched each item with external information and serialized everything into the response. The problem only showed up when running it repeatedly under load.&lt;/p&gt;</description></item></channel></rss>