• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / social-service-ea / 24449911581
90%
main: 90%

Build:
Build:
LAST BUILD BRANCH: fix/oom-subscriber-leak-and-heap-limit
DEFAULT BRANCH: main
Ran 15 Apr 2026 10:43AM UTC
Jobs 1
Files 192
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Apr 2026 10:33AM UTC coverage: 90.182% (-0.04%) from 90.219%
24449911581

Pull #407

github

kevinszuchet
fix: prevent OOM crashes from subscriber leak and duplicate subscriptions

Three critical fixes for the heap exhaustion crash (510 MB after ~62h):

1. Fix cleanup bug in ws-handler: the three cleanup steps (transport.close,
   detachUser, emitter.clear) were in a single try/catch. If transport.close()
   threw (uWS throws on closed sockets), detachUser and emitter.clear were
   skipped, permanently leaking the subscriber's emitter and generators.
   Each step is now an independent function with its own error handling.

2. Guard against duplicate subscriptions: clients can call the same stream
   RPC multiple times on one connection. Each call created another async
   generator with a 1000-item value queue, doubling memory per connection.
   Crash logs confirmed this for communityMemberConnectivityUpdate.
   Added per-(address, event) deduplication in handleSubscriptionUpdates.

3. Set explicit V8 heap limit (768 MB for 1024 MB prod containers) via
   NODE_OPTIONS env var in Dockerfile, overridable at deploy time.
Pull Request #407: fix: prevent OOM crashes from subscriber leak and duplicate subscriptions

2217 of 2596 branches covered (85.4%)

Branch coverage included in aggregate %.

31 of 36 new or added lines in 3 files covered. (86.11%)

28 existing lines in 2 files now uncovered.

5453 of 5909 relevant lines covered (92.28%)

71.79 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
92.72
-1.69% src/controllers/handlers/uws/ws-handler.ts
2
96.04
-1.91% src/logic/updates.ts

Coverage Regressions

Lines Coverage ∆ File
26
0.0
0.0% src/components.ts
2
86.11
0.0% src/controllers/routes/uws.routes.ts
Jobs
ID Job ID Ran Files Coverage
1 24449911581.1 15 Apr 2026 10:43AM UTC 384
91.1
GitHub Action Run
Source Files on build 24449911581
  • Tree
  • List 192
  • Changed 148
  • Source Changed 3
  • Coverage Changed 148
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #24449911581
  • Pull Request #407
  • PR Base - main (#23593170934)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc