Closed giratikanon closed 8 years ago
Seems like we're getting bad queries, or something, periodically. I get this message and the admin is broken until I restart it on the server.
Could be the delegate change I made:
uWSGI exceptions catcher for "GET /elections/2016/admin/2016-02-09/race/31796/" (request plugin: "python", modifier1: 0) Exception: peewee.InternalError: current transaction is aborted, commands ignored until end of transaction block Exception class: peewee.InternalError Exception message: current transaction is aborted, commands ignored until end of transaction block Backtrace: filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1836 function: "__call__" text/code: "return self.wsgi_app(environ, start_response)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1820 function: "wsgi_app" text/code: "response = self.make_response(self.handle_exception(e))" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1403 function: "handle_exception" text/code: "reraise(exc_type, exc_value, tb)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1817 function: "wsgi_app" text/code: "response = self.full_dispatch_request()" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1477 function: "full_dispatch_request" text/code: "rv = self.handle_user_exception(e)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1381 function: "handle_user_exception" text/code: "reraise(exc_type, exc_value, tb)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1475 function: "full_dispatch_request" text/code: "rv = self.dispatch_request()" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/flask/app.py" line: 1461 function: "dispatch_request" text/code: "return self.view_functions[rule.endpoint](**req.view_args)" filename: "elex_admin/app.py" line: 100 function: "race_detail" text/code: "context['race'] = models.ElexRace.get(models.ElexRace.raceid == raceid)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/peewee.py" line: 4403 function: "get" text/code: "return sq.get()" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/peewee.py" line: 2812 function: "get" text/code: "return clone.execute().next()" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/peewee.py" line: 2859 function: "execute" text/code: "self._qr = ResultWrapper(model_class, self._execute(), query_meta)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/peewee.py" line: 2555 function: "_execute" text/code: "return self.database.execute_sql(sql, params, self.require_commit)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/playhouse/postgres_ext.py" line: 377 function: "execute_sql" text/code: "self.commit()" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/peewee.py" line: 3212 function: "__exit__" text/code: "reraise(new_type, new_type(*exc_args), traceback)" filename: "/home/ubuntu/.virtualenvs/elex-admin-2016-02-09/local/lib/python2.7/site-packages/playhouse/postgres_ext.py" line: 370 function: "execute_sql" text/code: "cursor.execute(sql, params or ())" REQUEST_METHOD = GET REQUEST_URI = /elections/2016/admin/2016-02-09/race/31796/ PATH_INFO = /elections/2016/admin/2016-02-09/race/31796/ QUERY_STRING = SERVER_PROTOCOL = HTTP/1.0 SCRIPT_NAME = SERVER_NAME = ip-10-69-50-204 SERVER_PORT = 8006 REMOTE_ADDR = 127.0.0.1 HTTP_HOST = 127.0.0.1:8006 HTTP_CONNECTION = close HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_ACCEPT_ENCODING = gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE = en-US,en;q=0.8 HTTP_CACHE_CONTROL = no-cache HTTP_COOKIE = __gads=ID=9a0a332661dd7d91:T=1428690021:S=ALNI_MYbs4U3nIOEt8TmtY9blRWFxX5DOA; _ga=GA1.2.1822301978.1440685338; _dyid=-7484982536318064009; _cb_ls=1; __utma=108945114.1822301978.1440685338.1455229883.1455229883.1; __utmc=108945114; __utmz=108945114.1455229883.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _chartbeat2=Pnwb5BO9w71DvWBU6.1455210720226.1455319118592.11; WT_FPC=id=01c0bf11-0544-4607-bd90-21b6b6e16b8c:lv=1455319118625:ss=1455319118625; optimizelySegments=%7B%223007620980%22%3A%22referral%22%2C%223013750536%22%3A%22false%22%2C%223028090192%22%3A%22gc%22%2C%223032570147%22%3A%22none%22%2C%223315571554%22%3A%22direct%22%2C%223321851195%22%3A%22false%22%2C%223334171090%22%3A%22none%22%2C%223336921036%22%3A%22gc%22%2C%223763824064%22%3A%22gc%22%2C%223772273677%22%3A%22direct%22%2C%223774343588%22%3A%22false%22%2C%223778135334%22%3A%22none%22%7D; optimizelyEndUserId=oeu1453748884372r0.9268277115188539; optimizelyBuckets=%7B%7D; _dycst=dk.m.c.ms.frv4.ltos.; _dy_geo=US.NA.US_NY.US_NY_New%20York; _dy_toffset=-1; _dyus_8765260=17929%7C6%7C0%7C0%7C0%7C0.0.1453748884635.1455319119001.1570234.0%7C42%7C7%7C1%7C116%7C11%7C17%7C39%7C30%7C25%7C0%7C0%7C122%7C143%7C165%7C0%7C0%7C0%7C185%7C245%7C0%7C0%7C0%7C0 HTTP_PRAGMA = no-cache HTTP_REFERER = http://int-elex-stg-east.newsdev.net/elections/2016/admin/2016-02-09/ HTTP_UPGRADE_INSECURE_REQUESTS = 1 HTTP_USER_AGENT = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36 HTTP_X_FORWARDED_FOR = 170.149.100.10 HTTP_X_FORWARDED_PORT = 80 HTTP_X_FORWARDED_PROTO = http
This was happening because I had updated the delegate columns to elex_results in the loader but not in the admin: https://github.com/newsdev/elex-admin/commit/0b87b5ac8118472579fc731301b16d1bc4ebccea
elex_results
Seems like we're getting bad queries, or something, periodically. I get this message and the admin is broken until I restart it on the server.
Could be the delegate change I made: