[Users] mediaproxy MySQL server has gone away error

James Holden james.holden at uk.aql.com
Mon Feb 5 13:16:09 CET 2007


Hi Daniel,

Thanks very much - I'll look into that. OpenSER maintains it's
connection though, which is strange.

In reality, it may not be an issue when the box goes into production
because it'll constantly have calls going through it.

I can also recover the failed queries from the error log and pass them
to mysql to clean up.

Regards,

James

On Mon, Feb 05, 2007 at 12:25:29PM +0200, Daniel-Constantin Mierla wrote:
> I do not know about mediaproxy and python libraries, but there were some 
> versions of mysql client library in the past that have the reconnection 
> part broken. Check goolge and mysql documentation for that.
> 
> Cheers,
> Daniel
> 
> 
> On 01/31/07 13:47, James Holden wrote:
> >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