title: How do I determine the correct "max-old-space-size" for node.js?
body: <p>I'm having some trouble to understand how Node.js acts based on the parameter <code>max-old-space-size</code>.</p>
  <p>In my case, for example, I'm running two <code>t2.small</code> AWS instances (2GB of RAM).</p>
  <p>Not sure why, but I did set <code>max-old-space-size=4096</code> (4GB). What does node do in this case? Could this configuration lead to a possible memory allocation failure?</p>
  <p>How do I determine the correct value of <code>max-old-space-size</code> based on the server resources?</p>
  <p>My application is constantly growing the memory usage and I'm trying to understand everything about node internals.</p>