Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#886 closed defect (wontfix)

OperationalError: database is locked

Reported by: DISABLED Owned by:
Priority: minor Milestone:
Component: trac Version:
Keywords: Cc:
Parent Tickets: Sensitive: no


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/", line 450, in _dispatch_request
  File "/usr/lib/python2.6/dist-packages/trac/web/", line 229, in dispatch
  File "/usr/lib/python2.6/dist-packages/trac/web/", line 129, in save
    (self.last_visit, self.sid, authenticated))
  File "/usr/lib/python2.6/dist-packages/trac/db/", line 64, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.6/dist-packages/trac/db/", line 80, in execute
    result = PyFormatCursor.execute(self, *args)
  File "/usr/lib/python2.6/dist-packages/trac/db/", line 59, in execute
    args or [])
  File "/usr/lib/python2.6/dist-packages/trac/db/", line 51, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: database is locked


Change History (4)

comment:1 Changed 9 years ago by killyourtv

Component: unspecifiedtrac
Milestone: 0.9.5
Resolution: wontfix
Status: newclosed

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 8 years ago by killyourtv

Version: 0.9.4

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

comment:4 Changed 8 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.