Reputation: 482
I have this error in my application log:
sqlite3.OperationalError: database or disk is full
As plenty of disk space is available and my SQLite database does not appear to be corrupted (integrity_check
did not report any error), why is this happening and how can I debug it?
I am using the Lustre filesystem (with flock
set), and until now, it worked perfectly.
Versions are:
Upvotes: 7
Views: 11955
Reputation: 2455
On my Linux desktop system I run ~/.cache
in a tmpfs
& I saw:
sqlite3.OperationalError: database or disk is full
when my $USER
cache was 100%
full
Upvotes: 0
Reputation: 1690
By default, SQLite uses /tmp
temporary directory (not the memory). If /tmp
is too small you will get disk full
. In that case change the temporary directory like that: export TMPDIR=<big file system>
.
Upvotes: 4
Reputation: 864
I had same problem too. Your host or PC's storage is full so delete some files in your system then problem is gone.
Upvotes: -3
Reputation: 604
It's probably too late for the original poster, but I just had this problem and couldn't find an answer so I'll document my findings in the hope that it will help others:
As it turns out, an SQLite database actually can get full even if there's plenty of disk space, because it has a limit for the number of pages in a database file:
http://www.sqlite.org/pragma.html#pragma_max_page_count
In my case the value was 1073741823, which meant that in combination with a page size of 1024 Bytes the database maxed out at 1 TB and returned the "database or disk is full
" error.
The good news is that you can raise the limit; for example double it by issuing PRAGMA max_page_count = 2147483646;
.
The limit doesn't seem to be saved in the database file, though, so you have to run it in your application every time you open the database.
Upvotes: 12