SocketCluster / SocketCluster/socketcluster

Kubernetes : Some Warnings in Production Mode

Open
#480 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.2k
Forks
318
PR merge metrics
No merged PRs in 30d

Description

Hi, Noticed those logs on our Kubernetes SC server pod (3 Workers + 2 Brokers) :

1552651454358 - Worker 2 was respawned 1 1552651454751 - Origin: Worker (PID 1839) [Warning] SocketProtocolError: Client pong timed out at SCServerSocket._onSCClose (/usr/src/node_modules/socketcluster-server/scserversocket.js:249:17) at Timeout.<anonymous> (/usr/src/node_modules/socketcluster-server/scserversocket.js:194:10) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) [ 'From : ', '044191', ', To :', 'M00823' ] { channel: 'ROOM_044191' }

Please can You explain the "respawned status" effect on pending messages ? Also Is that the cause of client pong timed out ?

PS: For the configuration I changed the service type NodePort as default in your file "socketcluster-service.yaml" to a normal ClusterIP. Little confusing when your already have Ingress to forward the requests.

Env vars configuration :
"env": [ { "name": "NODE_ENV", "value": "prod" }, { "name": "SCC_STATE_SERVER_HOST", "value": "scc-state" }, { "name": "SOCKETCLUSTER_WORKERS", "value": "3" }, { "name": "SOCKETCLUSTER_BROKERS", "value": "2" }, { "name": "SCC_INSTANCE_IP", "valueFrom": { "fieldRef": { "apiVersion": "v1", "fieldPath": "status.podIP" } } }, { "name": "ENV", "value": "prod" } ]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing socketcluster-server/scserversocket.js at the logged _onSCClose and timeout locations, then inspect socketcluster-service.yaml and the supplied worker, broker, and Kubernetes settings. Reproduce or trace the warning in production mode and document how worker respawning affects pending messages, whether it relates to the pong timeout, and how the ClusterIP setting interacts with Ingress.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, kubernetes, node.js
Domain
backend, distributed-systems, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.