#200 InterfaceError: (0, '') MySQL 4.1.21

MySQLdb (285)

Hi Andy & all!

I need your general advice on debuggin following problem:

MySQL: 4.1.21
O/S: Gentoo
* dev-python/mysql-python
Installed: 1.2.0-r1

Module None, line 9, in getEvent_py
- <PythonScript at="" jo.hogg="" event.catalog="" getEvent_py="">
- Line 9
Module Shared.DC.ZRDB.DA, line 454, in call
- <SQL instance="" at="" b1dffc20="">
Module Products.ZMySQLDA.db, line 284, in query
InterfaceError: (0, '')

I can not generally reproduce the problem.

Things I know exactly:

  1. It only started to appear with latest upgrade
    to 4.1.21

  2. This error does not appear immediately. For
    me it seems to be random, not depending
    on server load, etc.

In fact what happen is: at first we have upgraded our
development server (Zope 2.8.4, python 2.4,
mysql-python 1.2.0). It worked fine for a week. Since
4.1.21 version of mysql has been marked as "security"
we processed to upgrade all production servers.

And now, on all our production serves this error
appears. After mysql upgrade we have reinstalled
python-mysql drivers again. Restarted MySQL, Zope, etc.
All works for some time, and then, all connections from
Zope stops working.

I tried to reproduce this error at home. And was able
to reproduce it stable by restarting MySQl while Zope
is up and running. Close/Open db connection helps to
reinitiate connection. Also Zope restart also helps...

When I compiled again 1.2.0 - problem disappears
forever. I was not able to reproduce it.

I also was not able to reproduce problem by trying high
load on our sites.

Nothing interesting here:

Also found a few follow-ups but they do not describe
the problem I have.


of course I looked at forums:

It does not match 100% my problem.

I only know that its started from MySQL 4.1.21. And it
affected all our servers located in different countries.

Any help & advices where to look to debug this problem
would be good.

Thank you!



  • Alex V. Koval

    Alex V. Koval - 2006-08-13

    Logged In: YES

    again this problem appeared. I looked at mysql processlist.
    the connection to database is alive:

    | 13862 | zope | localhost:33671 | dbname | Sleep |
    189 | | NULL |

    same in Zope, in connection tab:
    The database connection is open.

    Still, error is:
    Traceback (innermost last):
    Module ZPublisher.Publish, line 101, in publish
    Module ZPublisher.mapply, line 88, in mapply
    Module ZPublisher.Publish, line 39, in call_object
    Module Shared.DC.ZRDB.Connection, line 115, in manage_test
    Module Products.ZMySQLDA.db, line 284, in query
    InterfaceError: (0, '')

    Products.ZMySQLDA.db, line 284

    281 if qtype == "SELECT" and max_rows:
    282 qs = "%s LIMIT %d" % (qs,max_rows)
    283 r=0
    284 db.query(qs)
    285 c=db.store_result()
    286 if desc is not None:
    287 if c and (c.describe() != desc):

  • Alex V. Koval

    Alex V. Koval - 2006-08-13

    Logged In: YES

    restarting mysql have no impact. error still appears.
    if I come to MySQL connection tab, and do "disconnect" and
    then connect, problem will disappear for a random time.

    I have no idea where to debug it.

  • Andy Dustman

    Andy Dustman - 2006-08-13

    Logged In: YES

    What version of MySQL did you upgrade from? If 4.0, then
    re-emerging mysql-python is the correct fix, since the
    library version for MySQL changes between 4.0 and 4.1 (and 5.0).

  • Alex V. Koval

    Alex V. Koval - 2006-08-14

    Logged In: YES

    What version of MySQL did you upgrade from? If 4.0,

    No, upgrade was done because of security problems
    with 4.1.20 marked in gentoo as:

    200608-09 [N] MySQL: Denial of Service ( dev-db/mysql )

    So I upgraded from 4.1.20 to 4.1.21

    re-emerging mysql-python is the correct fix

    I did. But apparently it did not helped out. I mean,
    at first, I did not upgraded it. I just upgraded MySQL,
    and restarted Zope servers. Later, I found this problem and
    recompiled drivers, with hope it would help. But it did not.
    I still were getting this problem on many production sites.

    , since the library version for MySQL changes between 4.0
    and 4.1 (and 5.0).

    yes I understand and read MySQL bug 21543, but it does not
    seems to apply to this case.

    Now, since this issue were causing big problems for me, I
    decided to downgrade MySQL to 4.1.20, good that Gentoo Linux
    permits me to do so. So all production sites are back
    online, while development sites could be run with 4.1.21
    to diagnose the problem, if you advice me where to look at.

    At all, I have stopped at the point that this exception is
    getting raised from somewhere in C sources and I have no
    idea how to enable/where to see debug in MySQLdb and MySQL


  • Alex V. Koval

    Alex V. Koval - 2006-08-26

    Logged In: YES

    BTW, now I can confirm that problem really appears in 4.1.21
    only. More then a week pass since I have downgraded MySQL on
    all production servers to 4.1.20 - no problems were logged
    since that.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks