Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

Last modified 4 years ago

#6237 closed defect (worksforme)

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

Reported by: kig Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: devel
Severity: normal Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

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 (0)

Change History (5)

comment:1 by Christian Boos, 17 years ago

Keywords: mysql needinfo added; mod_wsgi apache removed
Milestone: 0.11.10.10.5

Related to the reconnect issue discussed in #5783?

Can you please test the patch in that ticket?

comment:2 by Christian Boos, 17 years ago

Milestone: 0.10.5

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

comment:3 by WanWizard [at] gmail.com, 16 years ago

I can confirm this problem, stil present in the current release (0.11.1).

Tracing back our changes on the server of the last few weeks, we realized that we have this error intermittendly after we've converted the database and tables from ISO-8859-1 to UTF-8.

As test, we're restored a backup from before the conversion, and the problem was gone. So it's definately encoding related. Also, I don't think this is Trac related, but a problem in the MySQL c++ library or the MySQLdb wrapper.

Our environment:

Trac: 0.11.1
Python: 2.3.4 (#1, Feb 15 2005, 19:42:48) [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)
setuptools: 0.6c3
MySQL: server: "4.1.22-log", client: "4.1.22", thread-safe: 0
MySQLdb: 1.2.1_p2
Genshi: 0.5.1
mod_python: < 3.2
Subversion: 1.4.3 (r23084)

jQuery: 1.2.6

comment:4 by Remy Blank, 16 years ago

Keywords: needinfo removed
Milestone: 1.0

Info provided, assigning to 1.0 until someone grabs it.

comment:5 by Christian Boos, 16 years ago

Milestone: 1.0
Resolution: worksforme
Status: newclosed

Well, this error was related to a MySQL misconfiguration.

If someone has this problem again, please read carefully the MySqlDb page, which explains how a MySQL database can be configured in order to operate correctly for Trac.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.