limits

Platform request concurrency, wall-clock request budgets, and outbound HTTP defaults. Server config: `gingee.json` → `limits` (see docs/server-config.md). App config: optional `app.json` → `limits` may only tighten (lower) server ceilings. Engine-internal (not for sandboxed app require).
Description:
  • Platform request concurrency, wall-clock request budgets, and outbound HTTP defaults. Server config: `gingee.json` → `limits` (see docs/server-config.md). App config: optional `app.json` → `limits` may only tighten (lower) server ceilings. Engine-internal (not for sandboxed app require).

Members

(inner, constant) appInFlight :Map.<string, number>

Type:
  • Map.<string, number>

(inner) logger :object|null

Type:
  • object | null

(inner) serverLimits :object

Type:
  • object

Methods

(inner) applyServerTimeouts(server)

Description:
  • Apply Node HTTP server timeout knobs.
Parameters:
Name Type Description
server object Node HTTP Server

(inner) attachRequestContext(store, token, res)

Description:
  • Attach AbortSignal + deadline timers to the ALS store for an HTTP script request. Call once when script execution begins (after concurrency acquire).
Parameters:
Name Type Description
store object ALS store
token object from tryAcquireRequest
res object Node HTTP ServerResponse

(inner) clearRequestTimers(store)

Description:
  • Clear request/stream timers (response completed normally).
Parameters:
Name Type Description
store object

(inner) initServer(config, logRefopt)

Description:
  • Merge server limits config onto defaults.
Parameters:
Name Type Attributes Description
config object | null | undefined
logRef object <optional>

(inner) onStreamStart(store)

Description:
  • Switch from request wall timeout to stream idle + hard cap.
Parameters:
Name Type Description
store object

(inner) releaseRequest(token)

Parameters:
Name Type Description
token object | null

(inner) remainingRequestMs(store) → {number|null}

Description:
  • Remaining ms until request deadline (non-stream). Minimum 1 if still active.
Parameters:
Name Type Description
store object | null
Returns:
Type
number | null

(inner) resolveForApp(app) → {object}

Description:
  • Effective limits for an app: server ceilings, app may only lower numeric caps/timeouts.
Parameters:
Name Type Description
app object | null
Returns:
Type
object

(inner) resolveOutboundTimeoutMs(optionsTimeout, store) → {number}

Description:
  • Resolve axios timeout: options.timeout if set, else platform outbound default; clamped to remaining request budget when available; never above server outbound default unless options.timeout is set (then clamped only by remaining budget).
Parameters:
Name Type Description
optionsTimeout number | undefined
store object | null
Returns:
Type
number

(inner) touchStream(store)

Description:
  • Reset stream idle timer (call on each write / writeSSE).
Parameters:
Name Type Description
store object

(inner) tryAcquireOutbound() → {Object|Object}

Returns:
Type
Object | Object

(inner) tryAcquireRequest(appName, app) → {Object|Object}

Description:
  • Try to admit one in-flight server-script request.
Parameters:
Name Type Description
appName string
app object
Returns:
Type
Object | Object