Opened 17 years ago

Closed 17 years ago

Last modified 11 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: dev
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

Description

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', 'http://www.tv.com/lost/show/24313/summary.html', '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"='http://www.tv.com/lost/show/24313/summary.html',"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 by anonymous, 17 years ago

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

comment:2 by Michael Radziej <mir@…>, 17 years ago

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 by anonymous, 17 years ago

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 by Simon G. <dev@…>, 17 years ago

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 "settings_sqlite.py" and save it into the "tests" subdirectory of wherver you have installed Django (it'll be something like django_src/tests)

DEBUG = TEMPLATE_DEBUG = True
ADMINS = MANAGERS = ()
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'test.db'
DATABASE_USER = DATABASE_PASSWORD = DATABASE_HOST = DATABASE_PORT = ''
SITE_ID = 1
ROOT_URLCONF = ''

open up a terminal and do this:

cd /path/django_src/tests/
python runtests.py --settings=settings_sqlite

comment:5 by anonymous, 17 years ago

I'm running it as a local site, using manage.py 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
OK

comment:6 by anonymous, 17 years ago

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 by mir@…, 17 years ago

Thank you for taking the time to close it!

comment:8 by ipetrovilya@…, 11 years ago

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