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

Interesting issue while logging in into CW Tracker #60

Open
enbewu opened this issue Sep 26, 2015 · 2 comments
Open

Interesting issue while logging in into CW Tracker #60

enbewu opened this issue Sep 26, 2015 · 2 comments

Comments

@enbewu
Copy link

enbewu commented Sep 26, 2015

INFO:whyattend.webapp:Querying Wargaming server for battle schedule of clan 500021712 PSQD
    return self._execute_and_instances(context)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2364, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 662, in execute
    params)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 874, in _execute_context
    context)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1024, in _handle_dbapi_exception
    exc_info
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 195, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 867, in _execute_context
    context)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 324, in do_execute
    cursor.execute(statement, parameters)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (OperationalError) (2006, 'MySQL server has gone away') 'SELECT player.id AS player_id, player.openid AS player_openid, player.wot_id AS player_wot_id, player.member_since AS player_member_since, player.name AS player_name, player.clan AS player_clan, player.role AS player_role, player.locked AS player_locked, player.lock_date AS player_lock_date, player.email AS player_email, player.phone AS player_phone, player.gold_earned AS player_gold_earned \nFROM player \nWHERE player.openid = %s \n LIMIT %s' ('https://eu.wargaming.net/id/513066661-coffeecat/', 1)

After reload everything worked. What could it be?

@enbewu
Copy link
Author

enbewu commented Sep 26, 2015

I've noticed bigger than usual load on the server, then I had this error report.

@ceari
Copy link
Owner

ceari commented Sep 26, 2015

This can happen when MySQL kills connections that are idle for longer than a certain timeout. The application probably tried to reuse one of these connections which lead to this error.
I've implemented a workaround described in https://mofanim.wordpress.com/2013/01/02/sqlalchemy-mysql-has-gone-away/ so it shouldn't happen again.

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

2 participants