---
title: "Comment by AbulAsar S. on \"Solving memory leak in NodeJs server while handling Streams\" | Hashnode"
description: "Nice article and a nice bug fix. I got something to learn about streams. About restarting the server on the crash, I was wondering if you could have used cluste"
url: "https://hashnode.com/posts/memory-leak-in-nodejs-streams/66776b0fdbf101532b6e9d59/comment/667d6899fe85343ba662e877"
---

[Discussion](https://hashnode.com/posts/memory-leak-in-nodejs-streams/66776b0fdbf101532b6e9d59)

Comment [Solving memory leak in NodeJs server while handling Streams](https://hashnode.com/posts/memory-leak-in-nodejs-streams/66776b0fdbf101532b6e9d59)

[AbulAsar S.](https://hashnode.com/@abulasar)

[Jun 27, 2024](https://hashnode.com/posts/memory-leak-in-nodejs-streams/66776b0fdbf101532b6e9d59/comment/667d6899fe85343ba662e877)

Nice article and a nice bug fix. I got something to learn about streams. About restarting the server on the crash, I was wondering if you could have used `cluster` to avoid a manual server restart.

[Samadrit Sarkar](https://hashnode.com/@samadritsarkar2)

[Jun 27, 2024](https://hashnode.com/posts/memory-leak-in-nodejs-streams/66776b0fdbf101532b6e9d59/comment/667d6899fe85343ba662e877#reply-667dd0225e6b140e5193cb7d)

Hey, thanks first of all. This was my first blog. Can you explain what you meant by cluster? You meant running the nodejs server in pm2 in cluster mode? Or kubernetes Cluster?

[AbulAsar S.](https://hashnode.com/@abulasar)

[Jun 28, 2024](https://hashnode.com/posts/memory-leak-in-nodejs-streams/66776b0fdbf101532b6e9d59/comment/667d6899fe85343ba662e877#reply-667e50f5841329f381b66611)

Yes. I was talking about PM2 in cluster mode. I believe its `fork` method can be useful in such a scenario.
