Skip to content

Commit 8ffdba7

Browse files
committed
Remove memory healthcheck
Supervisor has had memory leaks removed since v16.5.1, with latest tested version being v16.7.1. Furthermore, on recent reported instances of memory healthcheck triggering on support, we've snapshotted the heap before & after on devices multiple times without finding any evidence of memory leaks in the snapshots. Therefore, it's hypothesized that the heuristic for determining starting memory may be flawed in that it's not waiting long enough after system startup, or it may run right after garbage collection has happened. Because of the variability and difficulty of ascertaining these factors, we suspect an inaccurate memory baseline may be the cause of the instances of false positives on support. See: https://balena.zulipchat.com/#narrow/channel/403752-channel.2Fsupport-help/topic/supervisor.20memory.20usage.20above.20threadhold/near/520640885 Change-type: patch Signed-off-by: Christina Ying Wang <[email protected]>
1 parent f90d722 commit 8ffdba7

File tree

3 files changed

+1
-136
lines changed

3 files changed

+1
-136
lines changed

src/memory.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/supervisor.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import SupervisorAPI from './device-api';
77
import * as v1 from './device-api/v1';
88
import * as v2 from './device-api/v2';
99
import logMonitor from './logging/monitor';
10-
import * as memory from './memory';
1110

1211
import { initializeContractRequirements } from './lib/contracts';
1312
import { normaliseLegacyDatabase } from './lib/legacy';
@@ -72,11 +71,7 @@ export class Supervisor {
7271
log.info('Starting API server');
7372
this.api = new SupervisorAPI({
7473
routers: [v1.router, v2.router],
75-
healthchecks: [
76-
apiBinder.healthcheck,
77-
deviceState.healthcheck,
78-
memory.healthcheck,
79-
],
74+
healthchecks: [apiBinder.healthcheck, deviceState.healthcheck],
8075
});
8176
deviceState.on('shutdown', () => this.api.stop());
8277
return this.api.listen(conf.listenPort, conf.apiTimeout);

test/unit/memory.spec.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)