Page MenuHomePhabricator

(pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'tools.labsdb' ([Errno 111] Connection refused)") (Background on this error at: http://sqlalche.me/e/e3q8)
Closed, ResolvedPublic

Description

By going to https://tools.wmflabs.org/oabot/get-random-edit? I got the follwoing traceback error:

OAbot
Oops! Something went wrong.
Error:
(pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'tools.labsdb' ([Errno 111] Connection refused)") (Background on this error at: http://sqlalche.me/e/e3q8) 
Traceback (most recent call last):
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/data/project/oabot/www/python/src/app.py", line 158, in review_one_edit
nb_edits = UserStats.get('en', username).nb_edits
File "./oabot/userstats.py", line 81, in get
instance = session.query(cls).filter_by(wiki=wiki, user_name=user).first()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3215, in first
ret = list(self[0:1])
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3007, in __getitem__
return list(res)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3317, in __iter__
return self._execute_and_instances(context)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3339, in _execute_and_instances
querycontext, self._connection_from_session, close_with_result=True
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3354, in _get_bind_args
mapper=self._bind_mapper(), clause=querycontext.statement, **kw
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3332, in _connection_from_session
conn = self.session.connection(**kw)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1123, in connection
execution_options=execution_options,
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1129, in _connection_for_bind
engine, execution_options
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 430, in _connection_for_bind
conn = bind._contextual_connect()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 354, in connect
return _ConnectionFairy._checkout(self)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 751, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 483, in checkout
rec = pool._do_get()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/impl.py", line 138, in _do_get
self._dec_overflow()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/impl.py", line 135, in _do_get
return self._create_connection()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 299, in _create_connection
return _ConnectionRecord(self)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 428, in __init__
self.__connect(first_connect_check=True)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 630, in __connect
connection = pool._invoke_creator(self)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/pymysql/__init__.py", line 94, in Connect
return Connection(*args, **kwargs)
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/pymysql/connections.py", line 325, in __init__
self.connect()
File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/pymysql/connections.py", line 630, in connect
raise exc
OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'tools.labsdb' ([Errno 111] Connection refused)")
(Background on this error at: http://sqlalche.me/e/e3q8)

Event Timeline

Samwalton9 claimed this task.
Samwalton9 added a subscriber: Samwalton9.

Looks like this was a result of T236384 - this is working for me again.