PennyDreadfulMTG / perf-reports

2 stars 7 forks source link

500 error at /report/ #42390

Closed vorpal-buildbot closed 5 years ago

vorpal-buildbot commented 5 years ago

Failed to execute INSERT INTO deck_match (deck_id, match_id, games) VALUES (%s, %s, %s) with ['30437', 52836, '2'] because of (1213, 'Deadlock found when trying to get lock; try restarting transaction')

Reported on decksite by esqpoe

            --------------------------------------------------------------------------------
            Request Method: POST
            Path: /report/?
            Cookies: {'__cfduid': 'dea3fe543d7f013acfc21480ea226ea901539612031', 'session': '.eJx9kctuwjAQRf9l1lHlOA8SdrQigCgSUoXoQ1XkxpMQiO3EdloQ6r_XQaIsKnV574zvzByfIW9RCyZRWhhb3aMHjItawrhkjXGKo6iF4jddm0JpntfOgiANoiAJSTQiJErThKTgwT8VmVd93fDrpEZVFfJhA6PkJZHSlHogbKXy3qCWTKALQ9O1Cl2AYr3d0dxYZgef7HExE1oc_cW6MKPo5XEy8bdPrysxX3Jx67fqgO6iM7CiQGOuGr662XS116XVNOzV52G5WT93ZTraZ_MPs3Pv8djWGk3OHBw_CkmcBAFN7uLQpySObvWBV0zChBAPNJbO2v0OyZrtYZpNFmojMKinwaphcfFAGeVFJjs3xPFs3TVvDpz7hbo8Oe-CycC7B5eY3J6GFrhHplHDtwd_mFmmK3Rryr5pvn8AYtyXrQ.DvFY2Q.WK_lXrksYn_g0gHYED17d9WADbE'}
            Endpoint: add_report
            View Args: {}
            Person: 393538405700599809
            Referrer: https://pennydreadfulmagic.com/report/
            Request Data: {'entry': '30437', 'opponent': '30440', 'result': '2–0', 'draws': '0'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 2601:80:c100:997:2d01:f75c:8ada:6775, 162.158.63.24
Cf-Ray: 4878fd3e297191e2-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Referer: https://pennydreadfulmagic.com/report/
Content-Type: application/x-www-form-urlencoded
Dnt: 1
Upgrade-Insecure-Requests: 1
Cookie: __cfduid=dea3fe543d7f013acfc21480ea226ea901539612031; session=.eJx9kctuwjAQRf9l1lHlOA8SdrQigCgSUoXoQ1XkxpMQiO3EdloQ6r_XQaIsKnV574zvzByfIW9RCyZRWhhb3aMHjItawrhkjXGKo6iF4jddm0JpntfOgiANoiAJSTQiJErThKTgwT8VmVd93fDrpEZVFfJhA6PkJZHSlHogbKXy3qCWTKALQ9O1Cl2AYr3d0dxYZgef7HExE1oc_cW6MKPo5XEy8bdPrysxX3Jx67fqgO6iM7CiQGOuGr662XS116XVNOzV52G5WT93ZTraZ_MPs3Pv8djWGk3OHBw_CkmcBAFN7uLQpySObvWBV0zChBAPNJbO2v0OyZrtYZpNFmojMKinwaphcfFAGeVFJjs3xPFs3TVvDpz7hbo8Oe-CycC7B5eY3J6GFrhHplHDtwd_mFmmK3Rryr5pvn8AYtyXrQ.DvFY2Q.WK_lXrksYn_g0gHYED17d9WADbE
Cf-Connecting-Ip: 2601:80:c100:997:2d01:f75c:8ada:6775
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 53

DatabaseException Failed to execute INSERT INTO deck_match (deck_id, match_id, games) VALUES (%s, %s, %s) with ['30437', 52836, '2'] because of (1213, 'Deadlock found when trying to get lock; try restarting transaction') Stack Trace:

  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./decksite/main.py", line 339, in add_report
    if form.validate() and lg.report(form):
  File "./decksite/league.py", line 244, in report
    match.insert_match(dtutil.now(), form.entry, form.entry_games, form.opponent, form.opponent_games, None, None, mtgo_match_id)
  File "./decksite/data/match.py", line 32, in insert_match
    db().execute(sql, [left_id, match_id, left_games])
  File "./shared/database.py", line 45, in execute
    [n, _] = self.execute_anything(sql, args, False)
  File "./shared/database.py", line 60, in execute_anything
    raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e))

Exception_hash: f145376b73fca01a8ec3fcf31c34033489d3bd48

vorpal-buildbot commented 5 years ago

500 error at /report/

Failed to execute INSERT INTO deck_match (deck_id, match_id, games) VALUES (%s, %s, %s) with ['31132', 53812, '2'] because of (1205, 'Lock wait timeout exceeded; try restarting transaction')

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: POST
            Path: /report/?
            Cookies: {}
            Endpoint: add_report
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {'entry': '31132', 'opponent': '31125', 'result': '2–0', 'draws': '0', 'matchID': '213890563'}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: XX
X-Forwarded-For: 35.205.164.196, 141.101.69.17
Cf-Ray: 496f7eebdb8bbd65-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Content-Type: application/x-www-form-urlencoded
Cf-Connecting-Ip: 35.205.164.196
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive
Content-Length: 114

DatabaseException Failed to execute INSERT INTO deck_match (deck_id, match_id, games) VALUES (%s, %s, %s) with ['31132', 53812, '2'] because of (1205, 'Lock wait timeout exceeded; try restarting transaction') Stack Trace:

  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./decksite/main.py", line 339, in add_report
    if form.validate() and lg.report(form):
  File "./decksite/league.py", line 244, in report
    match.insert_match(dtutil.now(), form.entry, form.entry_games, form.opponent, form.opponent_games, None, None, mtgo_match_id)
  File "./decksite/data/match.py", line 32, in insert_match
    db().execute(sql, [left_id, match_id, left_games])
  File "./shared/database.py", line 45, in execute
    [n, _] = self.execute_anything(sql, args, False)
  File "./shared/database.py", line 60, in execute_anything
    raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e))

Exception_hash: f145376b73fca01a8ec3fcf31c34033489d3bd48

Labels: decksite; DatabaseException