{"record":{"id":"2cba2fc7e6367a48","repo":"diegosouzapw/OmniRoute","slug":"startup-could-not-start-cleanup-scheduler-non-f","errorCode":null,"errorMessage":"[STARTUP] Could not start cleanup scheduler (non-fatal):","messagePattern":"\\[STARTUP\\] Could not start cleanup scheduler \\(non-fatal\\):","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/instrumentation-node.ts","lineNumber":525,"sourceCode":"  // Settings > System & Storage and persists lastVacuumAt for the UI.\n  try {\n    const { initVacuumScheduler } = await import(\"@/lib/db/vacuumScheduler\");\n    initVacuumScheduler();\n    console.log(\"[STARTUP] Scheduled VACUUM initialized (#4437)\");\n  } catch (err: unknown) {\n    const msg = err instanceof Error ? err.message : String(err);\n    console.warn(\"[STARTUP] Could not initialize vacuum scheduler (non-fatal):\", msg);\n  }\n\n  // Retention cleanup scheduler (#4691/#6988, #9624): runs the general retention\n  // cleanup once after startup and then every 6 hours. Previously this was only\n  // wired into the unused src/server-init.ts, so telemetry tables grew unboundedly\n  // even with retention.autoCleanupEnabled=true. Idempotent (guarded internally).\n  try {\n    startCleanupScheduler();\n  } catch (err: unknown) {\n    const msg = err instanceof Error ? err.message : String(err);\n    console.warn(\"[STARTUP] Could not start cleanup scheduler (non-fatal):\", msg);\n  }\n\n  // Warm the model catalog's durable, apiKey-independent sub-caches at\n  // startup — see warmModelCatalogCache() for why the top-level Response\n  // cache alone doesn't deliver this. Fire-and-forget, non-fatal.\n  void warmModelCatalogCache();\n\n  if (!isBackgroundServicesDisabled()) {\n    // All services are independent — run in parallel for faster cold start.\n    await Promise.allSettled([\n      import(\"@/lib/services/bootstrap\")\n        .then(async (m) => {\n          await m.bootstrapEmbeddedServices();\n          console.log(\"[STARTUP] Embedded services bootstrap complete\");\n        })\n        .catch((err: unknown) => {\n          const msg = err instanceof Error ? err.message : String(err);\n          console.warn(\"[STARTUP] Embedded services bootstrap failed (non-fatal):\", msg);","sourceCodeStart":507,"sourceCodeEnd":543,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/instrumentation-node.ts#L507-L543","documentation":"Error \"[STARTUP] Could not start cleanup scheduler (non-fatal):\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/instrumentation-node.ts:525 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}