diegosouzapw/OmniRoute · error · Error

Maximum concurrent browser-login sessions reached

Error message

Maximum ${VNC_CONFIG.maxSessions} concurrent browser-login sessions reached

What it means

Capacity guard in startSession: the number of live VNC sessions equals VNC_CONFIG.maxSessions, so a new browser-login container is refused. Means the host is at its configured concurrency ceiling for Chromium containers (RAM/CPU bound) — existing sessions must finish, be harvested, or be swept by the idle reaper before a new one can start.

Solutions

  1. Stop or harvest-and-stop existing browser-login sessions to free a slot
  2. Wait for the idle sweep to reap abandoned sessions
  3. Raise VNC_CONFIG.maxSessions only if the host has headroom for more browser containers
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/vncSession/service.ts:173 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/1de249286266732d. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/vncSession/service.ts:173

export async function startSession(connectionId: string): Promise<VncSession> {
  if (await isConnectionUnavailableToAuxiliaryActivity(connectionId))
    throw new Error("Browser login is unavailable for managed lease connections");

  await reconcileStaleContainers();

  const connection = await getProviderConnectionById(connectionId);
  if (!connection) throw new Error("Provider connection not found");
  const providerId = typeof connection.provider === "string" ? connection.provider : "";
  const provider = getVncProvider(providerId);
  if (!provider) {
    throw new Error(`Browser login is not supported for provider '${providerId || "unknown"}'`);
  }

  const existing = findActiveSessionForConnection(connectionId);
  if (existing) return existing;
  if (SESSIONS.size >= VNC_CONFIG.maxSessions) {
    throw new Error(`Maximum ${VNC_CONFIG.maxSessions} concurrent browser-login sessions reached`);
  }

  const sessionId = randomUUID();
  const containerName = sessionKey(sessionId);
  const profileDir = createProfileDir(connectionId, sessionId);
  const state: VncSession = {
    sessionId,
    connectionId,
    providerId,
    containerName,
    profileDir,
    cdpPort: 0,
    vncPort: 0,
    url: provider.url,
    status: "starting",
    startedAt: Date.now(),
    lastViewerAt: Date.now(),
    lastHarvestAt: 0,

View on GitHub (pinned to a179ffed5b)