Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop idle private-memory growth from immortal parent spans #5411

ClosedBenchance(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/5411/headopened View on GitHub

Showing 4 changed files with 44 additions and 9 deletions (loading 1).

x
0 of 4 viewed, 4 left
1 addition and 1 deletionapps/server/src/auth/ServerSecretStore.tsModified
View file
@@ -181,7 +181,7 @@
}),
- Effect.withSpan("ServerSecretStore.get"),
+ Effect.withTracerEnabled(false),
​
const set: ServerSecretStore["Service"]["set"] = (name, value) => {
12 additions and 7 deletionsapps/server/src/preview/PortScanner.tsModified
View file
@@ -39,6 +39,7 @@
import { FetchHttpClient, HttpClient } from "effect/unstable/http";
​
import * as ProcessRunner from "../processRunner.ts";
+import { withoutAmbientParentSpan } from "../serverActivation.ts";
​
export class PortDiscovery extends Context.Service<
PortDiscovery,
@@ -547,9 +548,8 @@
​
- const pollTick = Effect.fn("PortDiscovery.pollTick")(
+ const pollTickActive = Effect.fn("PortDiscovery.pollTick")(
function* () {
- if ((yield* Ref.get(stateRef)).retainCount <= 0) return;