#10077 closed defect (duplicate)
OperationalError: database is locked
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.12 |
Severity: | normal | Keywords: | database, SQLite |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /browser/svn
, Trac issued an internal error.
was checking/debugging svn hooks
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
System Information
- using SQLite
Enabled Plugins
Plugin information not available
Python Traceback
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 511, in _dispatch_request File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 193, in dispatch File "build/bdist.linux-x86_64/egg/tractags/web_ui.py", line 66, in match_request File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 216, in __getattr__ File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 293, in _get_perm File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 216, in __getattr__ File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 300, in _get_session File "build/bdist.linux-x86_64/egg/trac/web/session.py", line 192, in __init__ File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 216, in __getattr__ File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 159, in authenticate File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 465, in wrap File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 509, in authenticate File "build/bdist.linux-x86_64/egg/trac/web/auth.py", line 83, in authenticate File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 598, in _get_name_for_cookie File "build/bdist.linux-x86_64/egg/trac/db/util.py", line 65, in execute File "build/bdist.linux-x86_64/egg/trac/db/sqlite_backend.py", line 78, in execute File "build/bdist.linux-x86_64/egg/trac/db/sqlite_backend.py", line 56, in execute File "build/bdist.linux-x86_64/egg/trac/db/sqlite_backend.py", line 48, in _rollback_on_error OperationalError: database is locked
Attachments (0)
Change History (7)
comment:1 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 14 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Well, except it's not supposed to occur anymore with 0.12.2 ;-)
So I'd like to get a few more details from the OP:
- which SQLite version? which PySqlite version?
- what web front end (mod_wsgi? version?)
- how often does the problem happen? any usage patterns?
- does the problem also happen without plugins? (we see account_mgr in the stack trace but maybe this is unrelated)
- what is the size of the session and session_attribute tables?
comment:3 by , 14 years ago
Replying to cboos:
- which SQLite version? which PySqlite version?
SQLite 3.3.6 pysqlite 2.3.3
- what web front end (mod_wsgi? version?)
FastCGI
- how often does the problem happen? any usage patterns?
Almost always when I'm using trac a bit faster. It's easily reproducible by clicking in the journal on two ticket links before the page is loaded (is it clear what I mean? ;-) ). Or when commenting on tickets relatively quickly. Reloading the page and sending POST data again makes this problem slightly less annoying.
- does the problem also happen without plugins? (we see account_mgr in the stack trace but maybe this is unrelated)
Yes
- what is the size of the session and session_attribute tables?
Well, I didn't actually took a look into the DB file, but there are just four accounts and I am pretty sure that (when those errors occurred) I was to only one using trac.
comment:4 by , 14 years ago
Ok, not many clues yet: maybe it's just the SQLite version which is too old? Or PySqlite built without multithread support?
Please build a recent version of PySqlite (as explained in that wiki page - recent versions will automatically fetch the current version of SQLite for you), and retry with that.
Optional follow-up questions (if the above rebuild is not enough):
- on which filesystem is the sqlite db file? (usually in
<tracenv>/db/trac.db
). Is that any kind of remote fs? - do you have enough space in the /tmp folder? I seem to recall that some versions of sqlite write their tmp journal file there (but I can be wrong on this)
comment:5 by , 13 years ago
Version: | 0.12.2 → 0.12 |
---|
comment:6 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
No feedback given to comment:4, closing.
comment:7 by , 12 years ago
Note that since then I've found a reproducible way to trigger this error: trying to access Trac while doing a backup of the database (trac-admin ENV hotcopy
).
Duplicate of #3446, one of our MostFrequentDuplicates.