Skip to content

Commit 1ad66ef

Browse files
committed
docs: add mobile SQLite considerations to sqlite.md
Document that `temp_store=memory` is required when running LND on Android/iOS via gomobile. Without it, SQLite fails with SQLITE_IOERR_GETTEMPPATH (error 6410) because the app sandbox prevents access to the system temporary directory.
1 parent d15111c commit 1ad66ef

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

docs/sqlite.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,24 @@ db.sqlite.busytimeout=10s
7070
db.sqlite.pragmaoptions=temp_store=memory
7171
db.sqlite.pragmaoptions=incremental_vacuum
7272
```
73+
74+
## Mobile (Android/iOS) considerations
75+
76+
When running LND on mobile platforms via gomobile, the following pragma option
77+
is **required**:
78+
79+
```
80+
db.sqlite.pragmaoptions=temp_store=memory
81+
```
82+
83+
Without this setting, SQLite will attempt to use the system temporary directory
84+
for intermediate results during complex operations. On Android (and iOS), the
85+
app sandbox prevents access to the system temp path, causing
86+
`SQLITE_IOERR_GETTEMPPATH` (error code 6410) failures. These failures manifest
87+
as `disk I/O error` during neutrino block header and compact filter header sync,
88+
typically when both sync processes run concurrently and trigger more complex
89+
database transactions.
90+
91+
Setting `temp_store=memory` tells SQLite to keep all temporary data in RAM
92+
instead of writing to disk, which avoids the sandbox restriction entirely. For
93+
LND's typical query patterns, the memory overhead is negligible.

0 commit comments

Comments
 (0)