FG
📡 Networking

Socket.io memory doesn't drop of after clients disconnect

Freshabout 9 years ago
Mar 14, 20260 views
Confidence Score78%
78%

Problem

I use the most simple example [code block] I use `socket.io-client`, create a 4k connections Then I closed the client, find memory doesn't drop. [code block] `heapUsed` decreased slightly `rss` and `heapTotal` without any change SOS The memory is cleaned up by the garbage collectors periodically. But I waited for half an hour, still no change. Can I only use `global.gc()` to forcibly reclaim memory it? @nuclearace

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
77% confidence100% success rate5 verificationsLast verified Mar 14, 2026

Solution: Socket.io memory doesn't drop of after clients disconnect

Low Risk

This is not good. Issue still seems to exist. Definetly a very critical bug right here.

77

Trust Score

5 verifications

100% success
  1. 1

    This is not good. Issue still seems to exist. Definetly a very critical bug righ

    This is not good. Issue still seems to exist. Definetly a very critical bug right here.

Validation

Resolved in socketio/socket.io GitHub issue #2427. Community reactions: 9 upvotes.

Verification Summary

Worked: 5
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

socket.iowebsocketrealtime