Modify

Opened 5 years ago

Closed 5 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

Description

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/api.py", line 377, in send_error
    'text/html')
  File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 725, in render_template
    req.chrome[type_].append(
  File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 195, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/lib/python2.4/site-packages/trac/util/compat.py", line 135, in newfunc
    return func_(*(args + fargs), **dict(kwargs, **fkwargs))
  File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 489, in prepare_request
    for category, name, text in contributor.get_navigation_items(req):
  File "/usr/lib/python2.4/site-packages/trac/ticket/query.py", line 748, in get_navigation_items
    if 'TICKET_VIEW' in req.perm and \
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 524, in has_permission
    return self._has_permission(action, resource)
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 537, in _has_permission
    decision = PermissionSystem(self.env). \
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 425, in check_permission
    perm)
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 281, in check_permission
    permissions = PermissionSystem(self.env). \
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 357, in get_user_permissions
    for perm in self.store.get_user_permissions(username):
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 175, in get_user_permissions
    cursor.execute("SELECT username,action FROM permission")
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 60, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 58, in execute
    args or [])
  File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", 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 5 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

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from eblot. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.