From 59ab39d033888351c23862ea5123bedbaff19182 Mon Sep 17 00:00:00 2001 From: Complementary Date: Sun, 12 Oct 2025 22:09:28 -0500 Subject: [PATCH 1/3] Reduce logging spam by setting this to debug --- packages/server/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index b59257b..3e29f2b 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -259,7 +259,7 @@ wssController.on('connection', (ws, req) => { const firstSpareWorkerId = nextSpareWorkerId; do { const mainDeviceId = identifyControlChannelFromWorkerId(nextSpareWorkerId); - log.info(`CONTROLLER: Found ${mainDeviceId} connects to workerId ${nextSpareWorkerId}`); + log.debug(`CONTROLLER: Found ${mainDeviceId} connects to workerId ${nextSpareWorkerId}`); if (mainDeviceId == null) { log.info(`CONTROLLER: Warning - found ${nextSpareWorkerId} in pool with no record of main device`); unallocatedConnections.push(nextSpareWorkerId); From da61afd943bdf813adcb08a6073a580e5db7361e Mon Sep 17 00:00:00 2001 From: Complementary Date: Sun, 12 Oct 2025 22:14:13 -0500 Subject: [PATCH 2/3] Make logging a little more concise --- packages/server/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 3e29f2b..46da144 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -288,7 +288,8 @@ wssController.on('connection', (ws, req) => { // no devices found, return the original one back to pool unallocatedConnections.push(nextSpareWorkerId); log.info( - `CONTROLLER: New connection from ${req.socket.remoteAddress} - no Devices available outside cooldown, rejecting`, + `CONTROLLER: New connection from ${req.socket.remoteAddress} - no Devices available outside cooldown, which is set to ${config.monitor.deviceCooldown} seconds. + If you're seeing this, either increase the number of devices, reduce the demand for workers, or decrease the device cooldown. Rejecting connection.`, ); // error! ws.close(3001, 'All devices are in cooldown'); From 518ea5e6e7633fc44d1e7b27475914e414aa514c Mon Sep 17 00:00:00 2001 From: Complementary Date: Sun, 12 Oct 2025 22:23:50 -0500 Subject: [PATCH 3/3] Don't include that newline, keep the logs sane --- packages/server/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 46da144..41ec207 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -288,8 +288,8 @@ wssController.on('connection', (ws, req) => { // no devices found, return the original one back to pool unallocatedConnections.push(nextSpareWorkerId); log.info( - `CONTROLLER: New connection from ${req.socket.remoteAddress} - no Devices available outside cooldown, which is set to ${config.monitor.deviceCooldown} seconds. - If you're seeing this, either increase the number of devices, reduce the demand for workers, or decrease the device cooldown. Rejecting connection.`, + `CONTROLLER: New connection from ${req.socket.remoteAddress} - no Devices available outside cooldown, which is set to ${config.monitor.deviceCooldown} seconds. `+ + `If you're seeing this, either increase the number of devices, reduce the demand for workers, or decrease the device cooldown. Rejecting connection.`, ); // error! ws.close(3001, 'All devices are in cooldown');