Opened 11 years ago

Closed 11 years ago

Last modified 4 years ago

#3352 closed Uncategorized (invalid)

failing sqlite3 query with error "database or disk is full"

Reported by: anonymous Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: sqlite3 stalled
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


It seems adding new stuff works fine, but UPDATE fails with this error:

"OperationalError at /content/update/
database or disk is full"

The raw sql query it's trying to run is : UPDATE "content_content" SET "signature"=?,"name"=?,"autoname"=?,"location"=?,"url"=?,"added_date"=? WHERE "id"=?

And the params : ['Lost', 'Lost', False, '/mnt/dump/Series/Lost', '', '2006-11-09 15:50:23.002833', 358]

However if I do sqlite3 mediadb.sql and run this:

UPDATE "content_content" SET "signature"="Lost","name"="Lost","autoname"="False","location"='/mnt/dump/Series/Lost',"url"='',"added_date"='2006-11-09 15:50:23.002833' WHERE "id"=358

It works fine, so I can't see why django would fail.

Change History (8)

comment:1 Changed 11 years ago by anonymous

Note that this has worked fine for a long long time, and I haven't changed anything that I can think of.

comment:2 Changed 11 years ago by Michael Radziej <mir@…>

Keywords: stalled added

This looks a bit like a strange error on your side, and I'd recommend that you send it to django-users. Also, run the django self-tests with sqlite as database. Does it succeed?

If you really are sure that this is a bug in django, please give us a reproduceable testcase.

comment:3 Changed 11 years ago by anonymous

it does look like a strange error on my side, but if I run the sql query manually, in sqlite3, it does work. Which is what made me think either django or pysqlite is the part where it stops.

And how do I run the django self tests? I couldn't find any information on that, and I looked around quite a bit.

comment:4 Changed 11 years ago by Simon G. <dev@…>

How are you running that site? could there be a permissions issue? (although INSERT should also fail if this was the case).

To run the tests, paste this into a new file called "" and save it into the "tests" subdirectory of wherver you have installed Django (it'll be something like django_src/tests)

DATABASE_NAME = 'test.db'

open up a terminal and do this:

cd /path/django_src/tests/
python --settings=settings_sqlite

comment:5 Changed 11 years ago by anonymous

I'm running it as a local site, using and the internal webserver. It's not a permission issue as running the UPDATE from sqlite3's commandline interface works fine.

If you look at the original report I did try to run the exact same command that django would have run (as far as I can tell anyway) in sqlite3's commandline interface. And that did work, that's what has me so puzzled.

(oh and the db itself is 900kb in size, so I shouldn't be hitting any size barriers).

Ran 68 tests in 9.824s

comment:6 Changed 11 years ago by anonymous

Resolution: invalid
Status: newclosed

I made a custom little script to copy all my tables to a new database, in effect making a 1:1 copy of the damn thing and now it seems to be working again. No clue why it happened in the first place, but it does work again now.

comment:7 Changed 11 years ago by mir@…

Thank you for taking the time to close it!

comment:8 Changed 4 years ago by ipetrovilya@…

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset

In my case an error "database or disk is full" was due to disk overflow mounted at /var/tmp. As SQLite3 uses temporary files for some queries it can run into problems then there is no space enough. It's not Django's bug.

Note: See TracTickets for help on using tickets.
Back to Top