Edgewall Software
Modify

Ticket #2345 (closed defect: worksforme)

Opened 6 years ago

Last modified 5 years ago

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

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

Description (last modified by cboos) (diff)

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

Change History

comment:1 Changed 6 years ago by anonymous

  • Version changed from 0.9 to devel

comment:2 Changed 6 years ago by cboos

  • 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 Changed 6 years ago by cmlenz

  • 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 Changed 6 years ago by cboos

  • Keywords pysqlite database locked added
  • Milestone set to 1.0
  • Owner changed from jonas to cboos
  • Severity changed from blocker to critical
  • Status changed from new to assigned

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 Changed 6 years ago by PBruin

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 Changed 6 years ago by cboos

  • Milestone 1.0 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed

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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.