diegosouzapw/OmniRoute · error

[HOT_RELOAD] SQLite file watch unavailable, polling only:

Error message

[HOT_RELOAD] SQLite file watch unavailable, polling only:

What it means

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.

Solutions

  1. Check filesystem/inotify limits (e.g. fs.inotify.max_user_watches on Linux)
  2. Verify the DATA_DIR path is accessible and watchable
  3. Tune the poll interval if faster reload detection is needed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/lib/config/hotReload.ts:90 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/3fa335b3ba48d788. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/config/hotReload.ts:90

  );

  pollTimer = setInterval(() => {
    queueHotReloadCheck("hot-reload:poll");
  }, pollIntervalMs);
  if (typeof pollTimer === "object" && "unref" in pollTimer) {
    (pollTimer as { unref?: () => void }).unref?.();
  }

  if (SQLITE_FILE) {
    try {
      sqliteWatcher = fs.watch(path.dirname(SQLITE_FILE), (_eventType, filename) => {
        const normalizedFilename = typeof filename === "string" ? filename : filename?.toString();
        if (isRelevantSqliteChange(normalizedFilename || null)) {
          queueHotReloadCheck("hot-reload:fs-watch");
        }
      });
    } catch (error) {
      console.warn(
        "[HOT_RELOAD] SQLite file watch unavailable, polling only:",
        error instanceof Error ? error.message : error
      );
    }
  }

  console.log(
    `[HOT_RELOAD] Runtime config hot-reload started (poll=${pollIntervalMs}ms, fsWatch=${
      sqliteWatcher ? "on" : "off"
    })`
  );

  queueHotReloadCheck("hot-reload:start");
}

export function stopRuntimeConfigHotReloadForTests() {
  if (pollTimer) {
    clearInterval(pollTimer);

View on GitHub (pinned to a179ffed5b)