diegosouzapw/OmniRoute · error
[DB] Failed to restore WAL mode after optimization settings:
Error message
[DB] Failed to restore WAL mode after optimization settings: ${message} What it means
Error "[DB] Failed to restore WAL mode after optimization settings: ${message}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/db/optimizationSettings.ts:208
console.log(
`[DB] Applying persistent optimization settings ` +
`(auto_vacuum ${currentAutoVacuum}->${targetAutoVacuum}, ` +
`page_size ${currentPageSize}->${targetPageSize})`
);
try {
if (shouldRestoreWal) db.pragma("journal_mode = DELETE");
db.pragma(`auto_vacuum = ${targetAutoVacuum}`);
db.pragma(`page_size = ${targetPageSize}`);
db.exec("VACUUM");
} finally {
if (shouldRestoreWal) {
try {
db.pragma("journal_mode = WAL");
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
console.warn(`[DB] Failed to restore WAL mode after optimization settings: ${message}`);
}
}
}
const newAutoVacuum = db.pragma("auto_vacuum", { simple: true }) as number;
const newPageSize = db.pragma("page_size", { simple: true }) as number;
if (newAutoVacuum !== targetAutoVacuum || newPageSize !== targetPageSize) {
throw new Error(
`database optimization settings did not take effect ` +
`(auto_vacuum expected ${targetAutoVacuum}, got ${newAutoVacuum}; ` +
`page_size expected ${targetPageSize}, got ${newPageSize})`
);
}
}
export function applyDatabaseOptimizationSettingsForDb(
db: SqliteDatabase,
settings: DatabaseOptimizationSettings,View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/db/optimizationSettings.ts:208 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/a802ce5d765611c4.
Report an issue: GitHub.