vendredi 1 avril 2016

sqlite3 disk usage while indexing a database

When I called sqlite3.connect('db').execute('CREATE INDEX ...'), my / partition became full and the script crashed with sqlite3.OperationalError: database or disk is full.

I have two partitions: / with 4GB free, /home with 1TB free. The python script is under /home.

How can I tell sqlite3 to use /home partition instead of / for its temporary files?

When I tried to see what files are being created under / while the python script was running, I found this:

python    24853 max    6u   REG    8,1 3821580012  788060 /var/tmp/etilqs_xARlZag1jj945jH (deleted)

Not sure what "deleted" means, but it seems to be the source of the problem.

Ubuntu 14.04LTS Python 3.5

Aucun commentaire:

Enregistrer un commentaire