Opened 9 years ago

Closed 4 years ago

#5868 closed defect (invalid)

"database is locked" on big repositories

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


Hi, 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 ?

Thanks, giacomo

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by Emmanuel Blot

Resolution: invalid
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Emmanuel Blot.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.