Opened 5 years ago

Closed 7 months ago

#5868 closed defect (invalid)

"database is locked" on big repositories

Reported by: Giacomo.Tenaglia@… Owned by: eblot
Priority: normal Component: RevtreePlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11


we are hosting about 300 SVN repositories, each one with its trac environment. We would like to use RevTree, but we're experiencing a "database is locked" problem when querying for big repositories.

The error displayed is:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/", line 377, in send_error
  File "/usr/lib/python2.4/site-packages/trac/web/", line 725, in render_template[type_].append(
  File "/usr/lib/python2.4/site-packages/trac/web/", line 195, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/lib/python2.4/site-packages/trac/util/", line 135, in newfunc
    return func_(*(args + fargs), **dict(kwargs, **fkwargs))
  File "/usr/lib/python2.4/site-packages/trac/web/", line 489, in prepare_request
    for category, name, text in contributor.get_navigation_items(req):
  File "/usr/lib/python2.4/site-packages/trac/ticket/", line 748, in get_navigation_items
    if 'TICKET_VIEW' in req.perm and \
  File "/usr/lib/python2.4/site-packages/trac/", line 524, in has_permission
    return self._has_permission(action, resource)
  File "/usr/lib/python2.4/site-packages/trac/", line 537, in _has_permission
    decision = PermissionSystem(self.env). \
  File "/usr/lib/python2.4/site-packages/trac/", line 425, in check_permission
  File "/usr/lib/python2.4/site-packages/trac/", line 281, in check_permission
    permissions = PermissionSystem(self.env). \
  File "/usr/lib/python2.4/site-packages/trac/", line 357, in get_user_permissions
    for perm in
  File "/usr/lib/python2.4/site-packages/trac/", line 175, in get_user_permissions
    cursor.execute("SELECT username,action FROM permission")
  File "/usr/lib/python2.4/site-packages/trac/db/", line 60, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.4/site-packages/trac/db/", line 58, in execute
    args or [])
  File "/usr/lib/python2.4/site-packages/trac/db/", line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: database is locked

Do you know how we can fix it ?


Attachments (0)

Change History (1)

comment:1 Changed 7 months ago by eblot

  • Resolution set to invalid
  • Status changed from new to closed

The database is locked issue is as old as Trac is. I do not think it is tied to the plugin.
Using SQLite is not recommended when user base grows: a DB designed for real concurrent accesses such as PSQL should be used instead.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.