[Users] mediaproxy MySQL server has gone away error

James Holden james.holden at uk.aql.com
Wed Jan 31 12:47:57 CET 2007


Hi all,

I'm having a problem with the mediaproxy rtp proxy.

I'm using to do accounting into a MySQL database.

After a period of inactivity, it loses it's connection to the MySQL server and
the update queries begin to fail. Openser stays connected, however.

The error in the logs is:

error: accounting failed. MySQL error: (2006, 'MySQL server has gone
away')

I'm running:

mediaproxy 1.8.0
openser-1.1.0 (using the RHEL3 rpm from the openser website)
openser-mysql-1.1.0 (again using the openser RHEL3 rpm)
Python-2.4.4
MySQL-python-1.2.1_p2

My Python skills aren't up to much. So far, I've tried added the
following line into /usr/local/mediaproxy/modules/mysql.py just before
the query call, to try and re-establish the connection:

    def query(self, query):
        self._query = query
        for c in range(0, 3):
            try:
                self.conn.db.ping()      <<<<<<---- added by me
                return self.cursor.execute(query)
            except MySQLdb.OperationalError, why:
                if why[0] not in (CR.SERVER_GONE_ERROR, CR.SERVER_LOST):
                    raise
        raise

... but it hasn't helped.

Has anyone seen this before?

Best regards,

James


-- 
James Holden                                      AQ Limited
Senior Systems Architect                  13-15 Hunslet Road
james.holden at uk.aql.com                      Leeds, LS10 1JQ
07989 702968                                   0800 389 5815
=====================================================
http://aql.com/documents/news/about_aql.pdf

"The service has been perfect."
BSI Inspectorate ltd

"really really really useful. easy to use and reduces manpower."
Fortnums

"without a shadow of a doubt...excellent"
Ruella James Plc
-----------------------------------------------------
(aq) Limited
13-15 Hunslet Road Leeds LS10 1JQ
194 Harrogate Road Leeds LS7 4NZ
http://www.aql.com
Sales: 08707 449227
Fax: 08707 449228
PGP public key http://aql.co.uk/A-Q.txt
Subject to our standard terms, found at
http://aql.com/site/termsofservice.php
-----------------------------------------------------

******************************

CONFIDENTIALITY

This e-mail is intended only for the use of the addressees named
above and may be confidential or legally privileged.
If you are not an addressee you must not read it and must not use
any information contained in nor copy it nor inform any person other
than (aq) limited or the addressees of its existence or contents.
If you have received this email and are not a named addressee, please
delete it and notify the (aq) limited customer service department via
admin at a-q.co.uk. Many thanks.

=========================================================




More information about the Users mailing list