Edgewall Software

Ticket #6237 (new defect)

Opened 9 months ago

Last modified 7 months ago

InterfaceError: (0, '') after idle period with mod_wsgi 1.1/Apache 2.2.3

Reported by: kig Owned by: jonas
Priority: normal Milestone:
Component: general Version: devel
Severity: normal Keywords: mysql needinfo
Cc:

Description

How to Reproduce

We are getting InterfaceError?: (0, ) on various pages occasionally, mostly after Trac's been idle for some time. Usually happens in the morning, and after refresh or two the error goes away.

We are running latest Trac with mod_wsgi on Apache. Here is apache info:

Server version: Apache/2.2.3 Server built: Aug 16 2006 00:15:34 Server's Module Magic Number: 20051115:3 Server loaded: APR 1.2.7, APR-Util 1.2.7 Compiled using: APR 1.2.7, APR-Util 1.2.7 Architecture: 32-bit Server MPM: Prefork

threaded: no

forked: yes (variable process count)

Server compiled with....

-D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/etc/httpd" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf"

mod_wsgi 1.1

GET operation on /wiki, Trac issued an internal error.

(please provide additional details here)

System Information

Trac 0.11dev-r6060
Python 2.3.4 (#1, May 2 2007, 19:26:00)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)]
setuptools 0.6c7
MySQL server: "5.0.22", client: "4.1.22", thread-safe: 1
MySQLdb 1.2.1_p2
Genshi 0.4.4
Subversion 1.2.1 (r15230)

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/web/main.py", line 381, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/web/main.py", line 160, in dispatch
    if handler.match_request(req):
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/wiki/web_ui.py", line 97, in match_request
    if 'WIKI_VIEW' in req.perm('wiki') and match:
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/perm.py", line 444, in has_permission
    decision = PermissionSystem(self.env). \
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/perm.py", line 362, in check_permission
    decision = policy.check_permission(username, action, context)
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/perm.py", line 221, in check_permission
    return PermissionSystem(self.env). \
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/perm.py", line 293, in get_user_permissions
    for perm in self.store.get_user_permissions(username):
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/perm.py", line 135, in get_user_permissions
    cursor.execute("SELECT username,action FROM permission")
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.3/site-packages/Trac-0.11dev_r6060-py2.3.egg/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 145, in execute
    charset = db.character_set_name()
InterfaceError: (0, '')

Attachments

Change History

Changed 9 months ago by cboos

  • keywords mysql needinfo added; mod_wsgi apache removed
  • milestone changed from 0.11.1 to 0.10.5

Related to the reconnect issue discussed in #5783?

Can you please test the patch in that ticket?

Changed 7 months ago by cboos

  • milestone deleted

Also, you should try to see if this sill happens with newer mod_wsgi releases.

Add/Change #6237 (InterfaceError: (0, '') after idle period with mod_wsgi 1.1/Apache 2.2.3)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.