{"record":{"id":"3fa335b3ba48d788","repo":"diegosouzapw/OmniRoute","slug":"hot-reload-sqlite-file-watch-unavailable-pollin","errorCode":null,"errorMessage":"[HOT_RELOAD] SQLite file watch unavailable, polling only:","messagePattern":"\\[HOT_RELOAD\\] SQLite file watch unavailable, polling only:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/config/hotReload.ts","lineNumber":90,"sourceCode":"  );\n\n  pollTimer = setInterval(() => {\n    queueHotReloadCheck(\"hot-reload:poll\");\n  }, pollIntervalMs);\n  if (typeof pollTimer === \"object\" && \"unref\" in pollTimer) {\n    (pollTimer as { unref?: () => void }).unref?.();\n  }\n\n  if (SQLITE_FILE) {\n    try {\n      sqliteWatcher = fs.watch(path.dirname(SQLITE_FILE), (_eventType, filename) => {\n        const normalizedFilename = typeof filename === \"string\" ? filename : filename?.toString();\n        if (isRelevantSqliteChange(normalizedFilename || null)) {\n          queueHotReloadCheck(\"hot-reload:fs-watch\");\n        }\n      });\n    } catch (error) {\n      console.warn(\n        \"[HOT_RELOAD] SQLite file watch unavailable, polling only:\",\n        error instanceof Error ? error.message : error\n      );\n    }\n  }\n\n  console.log(\n    `[HOT_RELOAD] Runtime config hot-reload started (poll=${pollIntervalMs}ms, fsWatch=${\n      sqliteWatcher ? \"on\" : \"off\"\n    })`\n  );\n\n  queueHotReloadCheck(\"hot-reload:start\");\n}\n\nexport function stopRuntimeConfigHotReloadForTests() {\n  if (pollTimer) {\n    clearInterval(pollTimer);","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/config/hotReload.ts#L72-L108","documentation":"fs.watch on the SQLite database directory threw, so the hot-reload mechanism cannot detect settings changes via filesystem events and will rely solely on the polling interval timer. Configuration reloads become slower (up to one poll interval of latency) but still function.","triggerScenarios":"Thrown at src/lib/config/hotReload.ts:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check filesystem/inotify limits (e.g. fs.inotify.max_user_watches on Linux)","Verify the DATA_DIR path is accessible and watchable","Tune the poll interval if faster reload detection is needed"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}