Comment 9 for bug 1691951

Revision history for this message
Mike Bayer (zzzeek) wrote :

OK based on the package I see we are using, 0.7.9 with some patches, and linking to the stack trace we have at http://paste.openstack.org/show/610572/, the error is thrown on line 1008 where MySQL is not sending the expected number of bytes:

      if len(data) < num_bytes:
            raise err.OperationalError(
                2013, "Lost connection to MySQL server during query")

so this would not necessarily be a timeout, it means the filehandle off the socket, when the client calls file.read(N), is returning with less than N bytes having been read. N here is determined by the MySQL protocol, and is sent within the packet header as to what it will be. This indicates the stream has been shut down prematurely (because otherwise, if the server just wasn't sending enough bytes, the read() call would continue waiting until we hit the timeout condition) so this indicates connectivity is being lost and/or the server is being killed abruptly.