Skip to content

Websocket client cap (~5) too low + no eviction → "Connection Failed" / "too many client" until reboot (sdcp_v3) #110

Description

@t2noob

centauri_carbon_websocket_issue (1).md

Product: Elegoo Centauri Carbon CC1.
Firmware: v1.4.49 ·
App:
/app/app, module sdcp_v3
Hardware:
Allwinner sun8iw20, ~108MB RAM, no swap

Bug

The web UI periodically shows "Monitoring: Connection Failed" and no live data (files/temps/camera/move). The app's websocket/realtime layer (sdcp_v3) rejects new clients with HTTP 500 "too many client" once its client count hits an internal cap, and doesn't reliably release stale sockets.

Repro

  1. Open 5+ browser tabs / monitoring sessions at http://<ip>/network-device-manager/….
  2. App logs websocket client count is over 5; further clients get 500 too many client.
  3. Close the extra tabs → recovers (101 Switching Protocols) — the server does not self-heal on its own until reboot.

Bug vs. feature

The ~5 cap looks like deliberate memory-protection (108MB / no-swap → avoid OOM → 16s watchdog hard reset). That's reasonable. The bug is: at the cap it wedges for everyone instead of evicting the oldest idle client, and it doesn't GC stale sockets (repeated -499 / ws close (null) churn).

Suggested fixes (priority)

  1. Evict oldest idle websocket to admit new client instead of 500.
  2. GC stale sockets promptly.
  3. Modest cap increase (10–12) within the 108MB budget.
  4. Per-IP limit + timeout so one host can't exhaust the pool.

Log evidence

[sdcp_v3][726][Warn]: websocket client count is over 5
[sdcp_v3][1010][Info]: /video reject: too many client, cnt=4
[sdcp_v3][968][Info]: ws close (null)
[sdcp_v3][971][Info]: c close . ws_client_unregister ret = -499

  • HTTP 500 "too many client" on upgrade while full; HTTP 101 once clients closed.

Related issues

Filed standalone because the specific root cause — the 5-client cap + 500 too many client + no eviction/GC — is not reported elsewhere.

Note for maintainers

sdcp_v3 is not in Elegoo's open-source release (closed prebuilt component) — verified by grep. So a source PR isn't possible from this side; this needs either an Elegoo firmware fix or a replacement in a from-scratch build (e.g. the OpenCentauri cosmos project).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions