# Bug Fix: SQLite SQLITE_BUSY Under Concurrent Writes
## The Problem
Next.js API routes handling concurrent POST requests to SQLite via `better-sqlite3` intermittently fail with:
```
SqliteError: database is locked
code: 'SQLITE_BUSY'
```
This happens because SQLite's default journal mode locks the entire database during writes.
sqlite-busy-fix.md