Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"_mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')" #91

Open
wo opened this issue Aug 22, 2016 · 0 comments
Open

Comments

@wo
Copy link
Owner

wo commented Aug 22, 2016

This happened today:

Traceback (most recent call last):
  File "bin/scraperdaemon.py", line 70, in <module>
    daemon.start()
  File "bin/scraperdaemon.py", line 38, in start
    self.run()
  File "bin/scraperdaemon.py", line 45, in run
    blogpostprocessor.run()
  File "/home/wo/opp-tools/bin/../opp/blogpostprocessor.py", line 18, in run
    cur.execute(query)
  File "/usr/local/lib/python3.4/dist-packages/MySQLdb/cursors.py", line 226, in execute
    self.errorhandler(self, exc, value)
  File "/usr/local/lib/python3.4/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorvalue
  File "/usr/local/lib/python3.4/dist-packages/MySQLdb/cursors.py", line 217, in execute
    res = self._query(query)
  File "/usr/local/lib/python3.4/dist-packages/MySQLdb/cursors.py", line 378, in _query
    rowcount = self._do_query(q)
  File "/usr/local/lib/python3.4/dist-packages/MySQLdb/cursors.py", line 341, in _do_query
    db.query(q)
  File "/usr/local/lib/python3.4/dist-packages/MySQLdb/connections.py", line 280, in query
    _mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')

I suppose the mysql connection timed out. Should use something like what's proposed on http://stackoverflow.com/questions/207981/how-to-enable-mysql-client-auto-re-connect-with-mysqldb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant