title: Random Error "Lost connection to MySQL server during query" with Django 1.3
body: <p>This thread doesn't quite help: <a href="https://stackoverflow.com/questions/1884859/lost-connection-to-mysql-server-during-query">Lost connection to MySQL server during query</a>.</p>
  
  <p>I increased the max_allowed_packet to be 16M and max_connections to be 9999. However, I still get this error:</p>
  
  <pre><code>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 107, in _result_iter
      self._fill_cache()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 772, in _fill_cache
      self._result_cache.append(self._iter.next())
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 273, in iterator
      for row in compiler.results_iter():
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 680, in results_iter
      for rows in self.execute_sql(MULTI):
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
      cursor.execute(sql, params)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 86, in execute
      return self.cursor.execute(query, args)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg/MySQLdb/cursors.py", line 174, in execute
      self.errorhandler(self, exc, value)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
      raise errorclass, errorvalue
  OperationalError: (2013, 'Lost connection to MySQL server during query')
  </code></pre>
  
  <p>It happened kinda randomly, can anyone shed some light on it?</p>