Situation:

I have a script adding build data to a database.  After it processes
some number of builds it dies with the following errors:
    mysql_exceptions.OperationalError: (2006, 'MySQL server has gone
away')

I am basically using the hub to commit a blob that could be as much as
1MB of data into a LONGTEXT field.

Cause:

The problem is that I am exceeding the default max packet size for my
instance of MySQL.  This setting can be found in the settings file
(mine is my.ini).  I altered mine such that the max value of a packet
would be 16MB

   [mysqld]
   max_allowed_packet=16M


For More Information
   http://dev.mysql.com/doc/refman/4.1/en/packet-too-large.html

Example Call Stack:
-----------------------------------------------------------------------------
 File
"c:\comp\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\main.py",
line 1042, in _SO_setValue
   self._connection._SO_update(
 File
"c:\comp\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconnection.py",
line 555, in _SO_update

   self.query("UPDATE %s SET %s WHERE %s = %s" %
 File
"c:\comp\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconnection.py",
line 732, in query
   return self._dbConnection._query(self._connection, s)
 File
"c:\comp\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\dbconnection.py",
line 300, in _query
   self._executeRetry(conn, conn.cursor(), s)
 File
"c:\comp\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\mysql\mysqlconnection.py",
line 60, in _e
ecuteRetry
   return cursor.execute(query)
 File "C:\comp\python24\Lib\site-packages\MySQLdb\cursors.py", line
137, in execute
   self.errorhandler(self, exc, value)
 File "C:\comp\python24\Lib\site-packages\MySQLdb\connections.py", line
33, in defaulterrorhandler
   raise errorclass, errorvalue
mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')

Reply via email to