[bug] Windows: index.sqlite-wal grew to 26 GB, passive WAL checkpoint stuck for 42 hours until restart
AI assistance and human ownership
- AI tool(s) used: Claude Code (Anthropic)
- autonomy level: agent. It read my logs and Screenpipe's source and drafted the evidence below. I reviewed it and am submitting it myself.
- what you personally verified: my free disk space fell from over 90 GB to about 63 GB within days of installing Screenpipe.
- [x] I personally submitted this issue; its problem statement and rationale are my own.
describe the bug In my own words: when we started, there was over 90 GB of free space on my disk and now it's about 63.3 GB. I was told to expect about 30 to 45 GB per month, not 30 GB in a few days.
The space was index.sqlite-wal, which reached 26 GB while the database itself is under 1 GB. The checkpoint stopped making progress and nothing recovered it until the app restarted.
system info
- os: Windows 11 Pro, build 26300, 64 GB RAM
- screenpipe version: app 2.7.132, engine 0.4.53 (first seen on 2.7.130)
- recording 3 monitors plus microphone and system audio, about 3 days of data
evidence from the app log
passive WAL checkpoint deferred; recording continues while reader snapshots drain logged every minute, with checkpointed frozen:
| time (UTC) | log_pages | journal size | checkpointed |
|---|---|---|---|
| 10-30 19:00:05 | 42,810 | 0.16 GB | 2401 |
| 10-31 00:00 | 2.56 GB | 2401 | |
| 10-31 12:00 | 10.05 GB | 2401 | |
| 11-01 00:00 | 18.57 GB | 2401 | |
| 11-01 12:00 | 24.71 GB | 2401 | |
| 11-01 13:02 | 6,684,430 | 25.6 GB | 2401 |
Sample line:
passive WAL checkpoint deferred; recording continues while reader snapshots drain pending_pages=6682029 log_pages=6684430 checkpointed=2401 busy=0
- Growth over the last 24 hours before the restart: 14.66 GB. The disk would have filled in about 4 more days at that rate.
- Measured just after the restart:
index.sqlite0.84 GB,index.sqlite-wal0.02 GB. No data lost. - The restart at 13:24 UTC took about 18 minutes before capture resumed, with the boot phase on
migrating_database, so recording was down that whole time. Boot time appears to scale with journal size. - It can come back: after a later restart at 14:49 UTC,
checkpointedhas stayed at 1641 since 15:11 UTC, and the journal was at 0.39 GB and growing when I wrote this.
expected The journal stays bounded. If a reader holds a snapshot for hours, Screenpipe should end or time out that reader, or warn the user, before the disk fills.
what is not established Which reader holds the snapshot is unknown. Hypotheses only:
- Source reading:
run_routine_wal_checkpointusesPRAGMA wal_checkpoint(PASSIVE)only and reports the backlog, so nothing escalates when it stays stuck. - The same warning appeared on 10-29, the install day, before any of my own backup jobs existed. #7704 describes a similar block from
quick_checkon macOS, but herequick_checkfinished in about 10 seconds at the 10-30 18:42 start, so that is not the cause in this case.
steps to reproduce
I do not have reliable steps. It happened on a normal install with recording left running. Watch the checkpointed value in screenpipe-app.<date>.log.
I tracked down the cause and opened #7900 with the fix. The new-contributor bot closed it within two seconds, so I'm linking it here.
Hybrid storage gets its index path from canonicalize, which on Windows returns \\?\C:\.... SQLite 3.51 sees the leading \\ and treats the file as one network share. In that mode every connection shares one -shm lock handle, and two connections that release the same read slot at the same moment can both skip the unlock. That read lock then has no owner, and PASSIVE checkpoints stop at its frame until the process exits.
That fits the log above: checkpointed stuck at 2401, busy=0, and the freeze coming back 22 minutes after the restart.
The fix opens SQLite with the plain C:\... path through dunce::simplified. My repro harness froze main 18 times in 120 runs. With the fix it froze 0 times in 120.
Harness and one frozen run's output: https://gist.github.com/SmitMachhi/d03d1c539c0eaaa07d0ea2d2f3ad9551
Confirming this on the current stable release, with the same signature that #7900 describes.
Environment: screenpipe app v2.7.145 (latest release), Windows 11 build 26200, hybrid storage (hybrid-parquet-v1), 3 monitors, audio on.
What I see (reproduced several times on 2026-11-13):
- 10–21 minutes after each app start,
index.sqlitestops being written andindex.sqlite-walgrows ~15–25 MB/min until the process exits (it has reached ~9.7 GB before). - Every minute:
passive WAL checkpoint deferred ... checkpointed=4481 busy=0.checkpointedstays frozen whilelog_pagesclimbs. - WAL-index header (
index.sqlite-shm, offset 96) during the freeze:nBackfill=4481,aReadMark = [0, 4481, 32318, 32508, 32532]. A single read mark equals nBackfill, matching theREAD1: HELDstate in #7900. - The startup log shows the DB opened through the verbatim path:
Database initialized at \\?\C:\Users\<user>\.screenpipe\storage\<id>\index.sqlite. - The timing is random. It happened with no meeting, and once ~30 s after a Teams meeting started. It also happened with
localRetentionEnabled=false. That fits a lock race, not a particular feature. - Only a full process exit clears it. The freeze returns within ~10–20 minutes of each restart.
Impact: on Windows this makes the app unusable for all-day recording. The WAL growth plus the restarts it forces cause system-wide lag, so I've had to shut screenpipe off.
#7900 (dunce::simplified on the SQLite filename in crates/screenpipe-db/src/db/setup.rs) was auto-closed by the new-contributor bot and never reviewed. Could a maintainer reopen and merge it, or land an equivalent fix? Main is still unfixed as of 2.7.147. Happy to test a build.
hey @louis030195 @EzraEllette , could one of you reopen #7900?
the bot closed it 2s after i opened it, so nobody’s looked at it yet.
it fixes this wal freeze. @Ajmholzer16 is hitting it too on 2.7.145. in my tests main froze 18 times out of 120 runs. with the fix, 0.
hi @SmitMachhi, thanks for contributing!
New contributor PRs automatically close to prevent spam. after we review and merge your first PR, the following will stay open.
I'll review this today and give you a free month of business as a thank you