Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2345 closed defect (worksforme)

"Server error!" loading any TRAC pages on new install using 2529 SVN

Reported by: anonymous Owned by: Christian Boos
Priority: normal Milestone:
Component: general Version: devel
Severity: critical Keywords: pysqlite database locked
Cc: peter.bruin@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

System successfully installed and working — shortly after, stopped working:

[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 199, in handler\n    env = get_environment(mpr, project_opts)
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 338, in get_environment\n    return _open_environment(env_path, threaded)
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 51, in _open_environment\n    env_cache[env_path] = open_environment(env_path)
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/env.py", line 373, in open_environment\n    if env.needs_upgrade():
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/env.py", line 279, in needs_upgrade\n    if participant.environment_needs_upgrade(db):
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/env.py", line 332, in environment_needs_upgrade\n    dbver = self.env.get_version(db)
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/trac/env.py", line 202, in get_version\n    cursor.execute("SELECT value FROM system WHERE name='database_version'")
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.3/site-packages/sqlite/main.py", line 244, in execute\n    self.rs = self.con.db.execute(SQL)
[Fri Nov 11 13:52:05 2005] [error] [client 16.110.70.23] PythonHandler trac.web.modpython_frontend: OperationalError: database is locked

Attachments (0)

Change History (6)

comment:1 by anonymous, 18 years ago

Version: 0.9devel

comment:2 by Christian Boos, 18 years ago

Description: modified (diff)

Interesting, it seems that there are still locking issues with PySqlite 1.1.6, then.

In the meantime, can you try to upgrade to a newer version of PySqlite? (≥ 2.0.5)

comment:3 by Christopher Lenz, 18 years ago

Cc: peter.bruin@… added

I have a simular error after updating to the latest version of the trunk. Before that I have been running without problems for a very long time. I assume it is something to do wiht the latest version as I never saw it before.

Oops...
Trac detected an internal error:
database is locked
Traceback (most recent call last):
  File "c:\python23\Lib\site-packages\trac\web\modpython_frontend.py",
line 206, in handler
    dispatch_request(mpr.path_info, mpr, env)
  File "c:\python23\Lib\site-packages\trac\web\main.py", line 139, in
dispatch_request
    dispatcher.dispatch(req)
  File "c:\python23\Lib\site-packages\trac\web\main.py", line 80, in
dispatch
    req.perm = PermissionCache(self.env, req.authname)
  File "c:\python23\Lib\site-packages\trac\perm.py", line 276, in __init__
    self.perms = PermissionSystem(env).get_user_permissions(username)
  File "c:\python23\Lib\site-packages\trac\perm.py", line 132, in
get_user_permissions
    for perm in self.store.get_user_permissions(username):
  File "c:\python23\Lib\site-packages\trac\perm.py", line 213, in
get_user_permissions
    cursor.execute("SELECT username,action FROM permission")
  File "C:\Python23\Lib\site-packages\sqlite\main.py", line 244, in
execute
    self.rs = self.con.db.execute(SQL)
OperationalError: database is locked

comment:4 by Christian Boos, 18 years ago

Keywords: pysqlite database locked added
Milestone: 1.0
Owner: changed from Jonas Borgström to Christian Boos
Severity: blockercritical
Status: newassigned

I guess this is happening while you're trying to log in? One workaround is to upgrade your PySqlite bindings to a version ≥ 2.0.5.

comment:5 by PBruin, 18 years ago

It happens at different times but I am always already logged in. I have upgraded to 2.0.5 and have not got the problem so far but I think it is to quick to draw conclusions. One thing I suspect is that it seems to occur more frequently after the post-commit-hook script is run that imports svn comments into tickets. PS. Some warning would have been in place that you need to upgrade the database when upgrading the bindings. As I'm not a database wiz it took me some time to sort that one out.

comment:6 by Christian Boos, 18 years ago

Milestone: 1.0
Resolution: worksforme
Status: assignedclosed

Some time has elapsed since… I think upgrading to PySqlite ≥ 2.0.5 is now the recommended way to handle the database is locked issue.

Please reopen if you're still seeing that with 2.0.5 or above.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.