Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#886 closed defect (wontfix)

OperationalError: database is locked

Reported by: guest Owned by:
Priority: minor Milestone:
Component: trac Version:
Keywords: Cc:
Parent Tickets:

Description

How to Reproduce

While doing a GET operation on /ticket/883, Trac issued an internal error.

I simply navigated to the page for 883 following some discussion of it yesterday.

Request parameters:

{'id': u'883'}

System Information

Trac 0.11.7
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
setuptools 0.6
SQLite 3.7.3
pysqlite 2.6.0
Genshi 0.6
Pygments 1.3.1
Monotone interface: 12.1

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 450, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 229, in dispatch
    req.session.save()
  File "/usr/lib/python2.6/dist-packages/trac/web/session.py", line 129, in save
    (self.last_visit, self.sid, authenticated))
  File "/usr/lib/python2.6/dist-packages/trac/db/util.py", line 64, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.6/dist-packages/trac/db/sqlite_backend.py", line 80, in execute
    result = PyFormatCursor.execute(self, *args)
  File "/usr/lib/python2.6/dist-packages/trac/db/sqlite_backend.py", line 59, in execute
    args or [])
  File "/usr/lib/python2.6/dist-packages/trac/db/sqlite_backend.py", line 51, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: database is locked


Subtickets

Change History (4)

comment:1 Changed 6 years ago by killyourtv

  • Component changed from unspecified to trac
  • Milestone 0.9.5 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This is due to the nature of sqlite. Something had the db locked. Try again a bit later and it'll work.

comment:2 Changed 5 years ago by killyourtv

  • Version 0.9.4 deleted

This will cease to be a problem when the DB is migrated to PostgreSQL.

comment:4 Changed 5 years ago by killyourtv

A few reasons for the DB being locked.

  • The DB could be locked while a backup is being taken
  • The DB could be locked due to several accesses at once.
Note: See TracTickets for help on using tickets.