Fix sqlite3 threadpool exhaustion with db.serialize() on startup

This commit is contained in:
Fedor Indutny 2021-03-12 14:18:24 -08:00 committed by Josh Perez
parent 246ca86319
commit 021b54cb75

View file

@ -236,6 +236,9 @@ async function openDatabase(filePath: string): Promise<sql.Database> {
};
instance = new sql.Database(filePath, callback);
// See: https://github.com/mapbox/node-sqlite3/issues/1395
instance.serialize();
});
}