{"action":"created","issue":{"url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/832","repository_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map","labels_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/832/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/832/comments","events_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/832/events","html_url":"https://github.com/PokemonGoMap/PokemonGo-Map/issues/832","id":172080398,"number":832,"title":"OperationalError: (1040, u'Too many connections') & TypeError: 'NoneType' object is not callable","user":{"login":"aldarund","id":571159,"avatar_url":"https://avatars.githubusercontent.com/u/571159?v=3","gravatar_id":"","url":"https://api.github.com/users/aldarund","html_url":"https://github.com/aldarund","followers_url":"https://api.github.com/users/aldarund/followers","following_url":"https://api.github.com/users/aldarund/following{/other_user}","gists_url":"https://api.github.com/users/aldarund/gists{/gist_id}","starred_url":"https://api.github.com/users/aldarund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldarund/subscriptions","organizations_url":"https://api.github.com/users/aldarund/orgs","repos_url":"https://api.github.com/users/aldarund/repos","events_url":"https://api.github.com/users/aldarund/events{/privacy}","received_events_url":"https://api.github.com/users/aldarund/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-19T08:29:27Z","updated_at":"2016-08-19T08:44:29Z","closed_at":null,"body":"After today update this error begin to popup right after workers start. Was working perfectly fine on yesterday commits, didnt changed a thing.\r\nAnd now some workers begin to give first this errors like 5 times\r\n```\r\n2016-08-19 08:17:29,150 [      db-cleaner][        models][   ERROR] Exception in clean_db_loop: (1040, u'Too many connections')\r\nTraceback (most recent call last):\r\n  File \"/opt/webapps/pogomap/PokemonGo-Map/pogom/models.py\", line 555, in clean_db_loop\r\n    query.execute()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 3274, in execute\r\n    return self.database.rows_affected(self._execute())\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 2656, in _execute\r\n    return self.database.execute_sql(sql, params, self.require_commit)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/playhouse/shortcuts.py\", line 207, in execute_sql\r\n    cursor = self.get_cursor()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 3431, in get_cursor\r\n    return self.get_conn().cursor()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 3424, in get_conn\r\n    self.connect()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 3404, in connect\r\n    self.initialize_connection(self.__local.conn)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 3316, in __exit__\r\n    reraise(new_type, new_type(*exc_args), traceback)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 3402, in connect\r\n    **self.connect_kwargs)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/playhouse/pool.py\", line 128, in _connect\r\n    conn = super(PooledDatabase, self)._connect(*args, **kwargs)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/peewee.py\", line 3929, in _connect\r\n    return mysql.connect(db=database, **conn_kwargs)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/__init__.py\", line 88, in Connect\r\n    return Connection(*args, **kwargs)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/connections.py\", line 690, in __init__\r\n    self.connect()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/connections.py\", line 908, in connect\r\n    self._request_authentication()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/connections.py\", line 1116, in _request_authentication\r\n    auth_packet = self._read_packet()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/connections.py\", line 983, in _read_packet\r\n    packet.check_error()\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/connections.py\", line 395, in check_error\r\n    err.raise_mysql_exception(self._data)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/err.py\", line 120, in raise_mysql_exception\r\n    _check_mysql_exception(errinfo)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/site-packages/pymysql/err.py\", line 112, in _check_mysql_exception\r\n    raise errorclass(errno, errorvalue)\r\nOperationalError: (1040, u'Too many connections')\r\n```\r\nAnd after it a bit different error \r\nTypeError: 'NoneType' object is not callable\r\n```\r\nException in thread db-cleaner:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/threading.py\", line 810, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/local/lib/python2.7/threading.py\", line 763, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File \"/opt/webapps/pogomap/PokemonGo-Map/pogom/models.py\", line 567, in clean_db_loop\r\n    log.exception('Exception in clean_db_loop: %s', e)\r\n  File \"/usr/local/lib/python2.7/logging/__init__.py\", line 1193, in exception\r\n    self.error(msg, *args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/logging/__init__.py\", line 1186, in error\r\n    self._log(ERROR, msg, args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/logging/__init__.py\", line 1278, in _log\r\n    record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)\r\n  File \"/usr/local/lib/python2.7/logging/__init__.py\", line 1252, in makeRecord\r\n    rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)\r\n  File \"/usr/local/lib/python2.7/logging/__init__.py\", line 269, in __init__\r\n    if (args and len(args) == 1 and isinstance(args[0], collections.Mapping)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/abc.py\", line 144, in __instancecheck__\r\n    return cls.__subclasscheck__(subtype)\r\n  File \"/opt/webapps/pogomap/lib/python2.7/abc.py\", line 174, in __subclasscheck__\r\n    for rcls in cls._abc_registry:\r\n  File \"/opt/webapps/pogomap/lib/python2.7/_weakrefset.py\", line 59, in __iter__\r\n    with _IterationGuard(self):\r\nTypeError: 'NoneType' object is not callable\r\n```\r\nAfter second error the whole worker stop working and nothing happens in it, no new scan or log messages just nothing."},"comment":{"url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/comments/240962582","html_url":"https://github.com/PokemonGoMap/PokemonGo-Map/issues/832#issuecomment-240962582","issue_url":"https://api.github.com/repos/PokemonGoMap/PokemonGo-Map/issues/832","id":240962582,"user":{"login":"pyr0ball","id":8482805,"avatar_url":"https://avatars.githubusercontent.com/u/8482805?v=3","gravatar_id":"","url":"https://api.github.com/users/pyr0ball","html_url":"https://github.com/pyr0ball","followers_url":"https://api.github.com/users/pyr0ball/followers","following_url":"https://api.github.com/users/pyr0ball/following{/other_user}","gists_url":"https://api.github.com/users/pyr0ball/gists{/gist_id}","starred_url":"https://api.github.com/users/pyr0ball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyr0ball/subscriptions","organizations_url":"https://api.github.com/users/pyr0ball/orgs","repos_url":"https://api.github.com/users/pyr0ball/repos","events_url":"https://api.github.com/users/pyr0ball/events{/privacy}","received_events_url":"https://api.github.com/users/pyr0ball/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T08:44:29Z","updated_at":"2016-08-19T08:44:29Z","body":"Would you mind sharing your config? How many workers/accounts? "}}
{"actor":{"display_login":"pyr0ball"}}