mbutil icon indicating copy to clipboard operation
mbutil copied to clipboard

sqlite3.operationalerror:database or disk is full

Open zuoshouxin123 opened this issue 4 years ago • 3 comments

please fix this problem,thanks! Traceback (most recent call last): File "H:\mbutil-master\mbutil-master\mbutil-master\mb-util", line 89, in disk_to_mbtiles(directory_path, mbtiles_file, **options.dict) File "H:\mbutil-master\mbutil-master\mbutil-master\mbutil\util.py", line 277, in disk_to_mbtiles optimize_database(con, silent) File "H:\mbutil-master\mbutil-master\mbutil-master\mbutil\util.py", line 78, in optimize_database cur.execute("""VACUUM;""") sqlite3.OperationalError: database or disk is full

zuoshouxin123 avatar Jan 26 '21 06:01 zuoshouxin123

I got this same error, but for me, it wasn't a problem with the mbutil tool itself.

I assume you don't see your disks as being full, which makes this error message somewhat of a riddle.

In my case, I use two storage drives, an SSD (which was almost full, but not quite) and an HDD (which has lots of space on it). Since I was saving my mbtiles fie to the HDD, I didn't think I could have disk space issues. It turns out that the "VACUUM" command works by copying the concents of the database to a temporary file in your system's temp folder. For me, my SSD was filling up temporarily, hence "sqlite3.OperationalError: database or disk is full".

Hope this helps and applies to your situation!

stephenjlee avatar Apr 12 '21 00:04 stephenjlee

I had this problem while executing VACUUM where huge temp file was attempted to be created in /var/tmp.

Workaround: SQLITE_TMPDIR=/path/to/alternative/tmp sqlite3 db.mbtiles

zdila avatar Jul 14 '23 14:07 zdila

Thank you zdila for the workaround. I have the same issue. I understand that it involves setting a specific environment variable. However, I don't know how to add it in util.py. Could you provide more information? Thank you very much! #

I had this problem while executing VACUUM where huge temp file was attempted to be created in /var/tmp.

Workaround: SQLITE_TMPDIR=/path/to/alternative/tmp sqlite3 db.mbtiles

GitRookie123 avatar Jul 30 '23 13:07 GitRookie123