You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
syncthing tells me "database or disk is full"
the disk can't be full:
pwd
/share/CACHEDEV2_DATA/.qpkg/SyncThing/index-v2
df
Filesystem Size Used Available Use% Mounted on
tmpfs 64.0M 35.4M 28.6M 55% /tmp
/dev/mapper/cachedev2
12.8T 1.6T 11.2T 13% /share/CACHEDEV2_DATA
Folder ID | m9xvj-celqf
-- | --
/share/Backups/LENOVO-Chris
database or disk is full
507’744 57’062 ~605 GiB
15’818 30’676 ~52.2 GiB
518’312 items, ~553 GiB
Receive Only
it changes always between Preparing to Sync and Waiting to Sync.
support-bundle-4FKKX5H-2025-09-05T160349.zipFolder ID m9xvj-celqf
Folder Path /share/Backups/LENOVO-Chris
Error database or disk is full
Global State 507’744 57’062 ~605 GiB
Local State
15’818 30’676 ~52.2 GiB
Out of Sync Items 518’312 items, ~553 GiB
Folder Type Receive Only
I removed the folder, to regenerate the db. Next time I deleted the folder and all data on the disk. But each time when the db is about 2.3 to 2.5 GB, I get this error. I tryed also to enable multiple debugs, but i don't find a reason.
SQLite will create temp files in some scenarios, and those will end up on /tmp which is quite small in your setup. I suspect this might be the root cause. Do you have the ability to set environment variables for Syncthing? It would be interesting to see what happens if you set for example SQLITE_TMPDIR=/share/CACHEDEV2_DATA/.qpkg/SyncThing/index-v2 (n.b. an existing directory or it won't be used)
I fear that we have a few folks who might not have much space in /tmp either because some NAS vendor is rolling with questionable defaults or they're using tmpfs on systems with low RAM.
Could we use a subdirectory of index-v2 for that? e.g index-v2/tmp ?
For us, that global variable is not accessible (though we can maybe provide patches to the two sqlite packages we use...), the PRAGMA is marked as deprecated and is apparently "super unsafe and unsupported" according to some forum thread, and the rest comes from the environment.
🤔 Actually, since we use the monitor+subprocess thing, we could set this in the monitor process and have it take effect for the subprocess. Of course we'll have to do the whole xdg directory resolution dance or we'll get people with pitchforks when we're putting temp files in a state directory etc, plus we currently don't do the work to figure out the database location from the monitor...
Activity
tomasz1986 commentedon Sep 5, 2025
Please see https://forum.syncthing.net/t/database-or-disk-is-full-might-be-syncthing-might-be-qnap/24930. This error means that your database has been corrupted.
Orca75 commentedon Sep 5, 2025
I removed the folder, to regenerate the db. Next time I deleted the folder and all data on the disk. But each time when the db is about 2.3 to 2.5 GB, I get this error. I tryed also to enable multiple debugs, but i don't find a reason.
calmh commentedon Sep 6, 2025
SQLite will create temp files in some scenarios, and those will end up on
/tmpwhich is quite small in your setup. I suspect this might be the root cause. Do you have the ability to set environment variables for Syncthing? It would be interesting to see what happens if you set for exampleSQLITE_TMPDIR=/share/CACHEDEV2_DATA/.qpkg/SyncThing/index-v2(n.b. an existing directory or it won't be used)bt90 commentedon Sep 6, 2025
I fear that we have a few folks who might not have much space in
/tmpeither because some NAS vendor is rolling with questionable defaults or they're using tmpfs on systems with low RAM.Could we use a subdirectory of
index-v2for that? e.gindex-v2/tmp?calmh commentedon Sep 6, 2025
I'd love to, but it seems surprisingly tricky to control from our side. "Temporary storage locations" on https://www.sqlite.org/tempfiles.html lists the hierarchy:
For us, that global variable is not accessible (though we can maybe provide patches to the two sqlite packages we use...), the PRAGMA is marked as deprecated and is apparently "super unsafe and unsupported" according to some forum thread, and the rest comes from the environment.
bt90 commentedon Sep 6, 2025
ugh. I guess setting that environment variable from our code isn't possible?
calmh commentedon Sep 6, 2025
🤔 Actually, since we use the monitor+subprocess thing, we could set this in the monitor process and have it take effect for the subprocess. Of course we'll have to do the whole xdg directory resolution dance or we'll get people with pitchforks when we're putting temp files in a state directory etc, plus we currently don't do the work to figure out the database location from the monitor...
fix(sqlite): explicitly set temporary directory location (fixes synct…
fix(sqlite): explicitly set temporary directory location (fixes synct…
fix(sqlite): explicitly set temporary directory location (fixes synct…
fix(sqlite): explicitly set temporary directory location (fixes synct…
fix(sqlite): explicitly set temporary directory location (fixes synct…
fix(sqlite): explicitly set temporary directory location (fixes #10368)…
Orca75 commentedon Sep 8, 2025
Wow, you are pretty fast to find the root cause. Thanks a lot for your help. I just took a look and it's still running and syncing without problems.