#10024 closed defect (fixed)
TimeoutError: Unable to get database connection within 0 seconds. (<trac.core.TracError instance at 0x92de2ec>)
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | high | Milestone: | 0.12.3 |
Component: | database backend | Version: | 0.12.2 |
Severity: | major | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /
, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{}
User agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; ko-kr) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
System Information
System information not available
Enabled Plugins
Plugin information not available
Python Traceback
Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/web/main.py", line 511, in _dispatch_request File "build/bdist.linux-i686/egg/trac/web/main.py", line 202, in dispatch File "build/bdist.linux-i686/egg/trac/web/main.py", line 344, in _pre_process_request File "build/bdist.linux-i686/egg/trac/versioncontrol/api.py", line 330, in pre_process_request File "build/bdist.linux-i686/egg/trac/versioncontrol/api.py", line 503, in get_repository File "build/bdist.linux-i686/egg/trac/versioncontrol/api.py", line 571, in get_all_repositories File "build/bdist.linux-i686/egg/trac/versioncontrol/api.py", line 112, in get_repositories File "build/bdist.linux-i686/egg/trac/env.py", line 328, in get_db_cnx File "build/bdist.linux-i686/egg/trac/db/api.py", line 90, in get_read_db File "build/bdist.linux-i686/egg/trac/db/api.py", line 152, in get_connection File "build/bdist.linux-i686/egg/trac/db/pool.py", line 226, in get_cnx File "build/bdist.linux-i686/egg/trac/db/pool.py", line 146, in get_cnx TimeoutError: Unable to get database connection within 0 seconds. (<trac.core.TracError instance at 0x92de2ec>)
Attachments (0)
Change History (8)
comment:1 by , 14 years ago
Component: | general → database backend |
---|---|
Milestone: | → 0.12.3 |
Version: | → 0.12.1 |
comment:2 by , 14 years ago
Owner: | set to |
---|---|
Version: | 0.12.1 → 0.12.2 |
Ouch, actually this kind of unhelpful message is also delivered in 0.12.2…
comment:3 by , 14 years ago
… 0.12.2 if Python 2.4 is used. For 2.5 and up, the original exception is reported in clear text.
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Error reporting for Python 2.4 fixed in r10552.
Please upgrade to latest 0.12-stable and you should see inside the parenthesis the reason for the connection failure.
comment:5 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I am running trac 12.2 and changed the line as noted in r10552.
[Trac 0.12.2]
Python 2.4.3 mysql-server-5.0.77-3.el5
However I am still getting the same error as noted with out a reason:
Mar 3 22:07:55 ceitrac email2trac cloud: Traceback (most recent call last): Mar 3 22:07:55 ceitrac email2trac cloud: File "/etc/smrsh/email2trac", line 2466, in ? tktparser.parse(sys.stdin) Mar 3 22:07:55 ceitrac email2trac cloud: File "/etc/smrsh/email2trac", line 1538, in parse self.db = self.env.get_db_cnx() Mar 3 22:07:55 ceitrac email2trac cloud: File "build/bdist.linux-x86_64/egg/trac/env.py", line 328, in get_db_cnx Mar 3 22:07:55 ceitrac email2trac cloud: File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 90, in get_read_db Mar 3 22:07:55 ceitrac email2trac cloud: File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 152, in get_connection Mar 3 22:07:55 ceitrac email2trac cloud: File "build/bdist.linux-x86_64/egg/trac/db/pool.py", line 226, in get_cnx Mar 3 22:07:55 ceitrac email2trac cloud: File "build/bdist.linux-x86_64/egg/trac/db/pool.py", line 146, in get_cnx Mar 3 22:07:55 ceitrac email2trac cloud: TimeoutError: Unable to get database connection within 0 seconds. (<trac.core.TracError instance at 0x69731b8>)
I can run trac-admin commands and get results fine, and I can run email2trac from command line and a new message is created - however when I set the log level to debug and then try a mail message via sendmail the syslog shows the error above. I can't tell what is causing the DB timeout since there doesn't appear to be a text error message..
please let me know what else is required to troubleshoot.
follow-up: 7 comment:6 by , 14 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Wow - It's too late! I realized right after i typed above that the file I edited was the unzipped file - NOT the file in the .egg! So I moved the 12.2 egg and reran easy_install -Z against trac12.2-stable and now I'm running Trac 0.12.3dev-r10609 I DO SEE an error now :-) It doesn't make any more sense than it did a few minutes ago - but at least I see an error!
Mar 3 22:51:59 ceitrac email2trac cloud: File "/usr/lib/python2.4/site-packages/Trac-0.12.3dev_r10609-py2.4.egg/trac/db/pool.py", line 147, in get_cnx raise TimeoutError(errmsg) Mar 3 22:51:59 ceitrac email2trac cloud: TimeoutError: Unable to get database connection within 0 seconds. (TracError: Database "/trac/projects/cloud/db/trac.db" not found.)
So something in the script is assuming sqlite DB I suppose? Anyway the original reason I reopened the ticket is invalid - I'll have to troubleshoot the error above via trac or email2trac I suppose…
Thanks (If anyone DOES know why the above is happening feel free to post it - or email me grendelson AT gmail
comment:7 by , 14 years ago
Replying to anonymous:
So something in the script is assuming sqlite DB I suppose? Anyway the original reason I reopened the ticket is invalid - I'll have to troubleshoot the error above via trac or email2trac I suppose…
Make sure the user running the web server has read access to trac.ini
.
comment:8 by , 14 years ago
Resolution: | worksforme → fixed |
---|
Perfect, the report I was waiting for ;-)
Could you please upgrade to 0.12.2 and see the more detailed error message you'd get with that version? (Let's hope the error is reproducible…)