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

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

Build:
Build:
LAST BUILD BRANCH: fix/oom-subscriber-leak-and-heap-limit
DEFAULT BRANCH: main
Ran 15 Apr 2026 01:02PM 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 12:57PM UTC coverage: 89.588% (-0.6%) from 90.219%
24455772176

Pull #407

github

kevinszuchet
fix: add cork wrapping, subscriber metrics, reconciliation, and sScan

Hardening changes to complement the critical OOM fixes:

1. Wrap all HTTP responses in res.cork() to prevent uWS warnings about
   writes outside corked callbacks. Under GC pressure these interleaved
   writes can hold object references longer than necessary.

2. Add subscriber monitoring metrics (gauges): subscribers_local_count,
   subscribers_generators_count, subscribers_redis_set_size, and a
   subscribers_stale_cleaned counter. Reported every 30s via setInterval.

3. Add periodic stale subscriber reconciliation (every 5 min, configurable
   via SUBSCRIBER_RECONCILIATION_INTERVAL_MS). Cross-references local
   subscribers against active WS connections from wsPool and removes any
   orphaned subscribers that the cleanup path missed.

4. Replace redis.sMembers() with redis.client.sScanIterator() in
   getSubscribersAddresses() to avoid loading the entire Redis SET at
   once. Adds a warning log when the set exceeds 10,000 entries.

5. Add redis.sCard() for O(1) subscriber count metric reporting.
6. Add wsPool.getAuthenticatedAddresses() for reconciliation.
Pull Request #407: fix: prevent OOM crashes from subscriber leak and duplicate subscriptions

2220 of 2615 branches covered (84.89%)

Branch coverage included in aggregate %.

70 of 122 new or added lines in 7 files covered. (57.38%)

2 existing lines in 1 file now uncovered.

5472 of 5971 relevant lines covered (91.64%)

71.43 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
70.16
-15.56% src/adapters/rpc-server/subscribers-context.ts
7
75.68
-24.32% src/logic/ws-pool/component.ts
5
84.29
-1.83% src/controllers/routes/uws.routes.ts
4
76.56
-8.44% src/adapters/redis.ts
3
92.72
-1.69% src/controllers/handlers/uws/ws-handler.ts
2
0.0
0.0% src/components.ts
2
96.04
-1.91% src/logic/updates.ts

Coverage Regressions

Lines Coverage ∆ File
2
76.56
-8.44% src/adapters/redis.ts
Jobs
ID Job ID Ran Files Coverage
1 24455772176.1 15 Apr 2026 01:02PM UTC 384
90.49
GitHub Action Run
Source Files on build 24455772176
  • Tree
  • List 192
  • Changed 149
  • Source Changed 8
  • Coverage Changed 149
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #24455772176
  • 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