PennyDreadfulMTG / perf-reports

2 stars 7 forks source link

500 error at / #42325

Closed vorpal-buildbot closed 5 years ago

vorpal-buildbot commented 5 years ago

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (29894, 29824, 29798, 29783, 29691, 29484)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_5dd_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 63.143.42.242, 162.158.186.242
Cf-Ray: 4813bac2bde33810-ATL
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
Cache-Control: no-cache
Referer: https://pennydreadfulmagic.com
Cf-Connecting-Ip: 63.143.42.242
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (29894, 29824, 29798, 29783, 29691, 29484)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_5dd_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (29894, 29824, 29798, 29783, 29691, 29484)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_5dd_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by shin_ra_ban_sho

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd89960b084fa4d3f606db589890b504771538625737', 'deck_id': '26750', 'session': '.eJx9UV1rgzAU_S_3WYaaqbFv_abdYFDch44RUo0xTBNJ4tZS-t8XC10fBns85557zs3JCUjPdEclkxYmVg_MA1p1QsKkpq1xqGKd6FR1w8KUSldEOAqCOMVxmGCUxMjHCYp98OCfiSR8EG11TWpVSVvm1EzCiDhn1XiPUfLiHyZJ5EFnuSKDYVrSbhSbxvloSvZUEtMot6noYJuQGEvtKPgyHNcs24hdtnuO57viJd0-LPgUva6mJr_prfp0wZMT0LJkxlwxLLf8O18vspq_VY9Pog_TPNse1bTkdh31bp8deqGZIdR1FkQojXCaovAuTII0SW7jscXYv8e-74FmtaOa34zoEKE8QLgoXvOVWG5sN99nyCrTznAxcxmu5d495t3V6f5G1EfHXcoz8OHBxYbY4yiBGaOaaTh78Kc7SzVn7ko5tO35B22_nns.DuElcw.62oMp_9QbW9a5225ufVWQ53g2nQ'}
            Endpoint: home
            View Args: {}
            Person: 169862783763087360
            Referrer: http://pdmtgo.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: AR
X-Forwarded-For: 186.19.216.154, 108.162.210.108
Cf-Ray: 4813bb51eff5b907-MIA
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://pdmtgo.com/
Accept-Language: en-US,en;q=0.9,ja;q=0.8,es;q=0.7
Cookie: __cfduid=d89960b084fa4d3f606db589890b504771538625737; deck_id=26750; session=.eJx9UV1rgzAU_S_3WYaaqbFv_abdYFDch44RUo0xTBNJ4tZS-t8XC10fBns85557zs3JCUjPdEclkxYmVg_MA1p1QsKkpq1xqGKd6FR1w8KUSldEOAqCOMVxmGCUxMjHCYp98OCfiSR8EG11TWpVSVvm1EzCiDhn1XiPUfLiHyZJ5EFnuSKDYVrSbhSbxvloSvZUEtMot6noYJuQGEvtKPgyHNcs24hdtnuO57viJd0-LPgUva6mJr_prfp0wZMT0LJkxlwxLLf8O18vspq_VY9Pog_TPNse1bTkdh31bp8deqGZIdR1FkQojXCaovAuTII0SW7jscXYv8e-74FmtaOa34zoEKE8QLgoXvOVWG5sN99nyCrTznAxcxmu5d495t3V6f5G1EfHXcoz8OHBxYbY4yiBGaOaaTh78Kc7SzVn7ko5tO35B22_nns.DuElcw.62oMp_9QbW9a5225ufVWQ53g2nQ
Cf-Connecting-Ip: 186.19.216.154
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (29894, 29824, 29798, 29783, 29691, 29484)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_5dd_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (29894, 29824, 29798, 29783, 29691, 29484)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_5dd_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 63.143.42.242, 108.162.237.174
Cf-Ray: 4813bc3a5e9d82b5-ATL
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
Cache-Control: no-cache
Referer: https://pennydreadfulmagic.com
Cf-Connecting-Ip: 63.143.42.242
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (29894, 29824, 29798, 29783, 29691, 29484)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_5dd_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://www.google.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: IT
X-Forwarded-For: 2.42.118.132, 172.68.198.48
Cf-Ray: 496ef14fec956f66-FCO
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://www.google.com/
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cf-Connecting-Ip: 2.42.118.132
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62af0cb4342ce58a93ad80240ae2782f1547121200', '_ga': 'GA1.2.289526395.1547121205', '_gid': 'GA1.2.1079086850.1547121205', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: IT
X-Forwarded-For: 2.42.118.132, 172.68.198.48
Cf-Ray: 496ef2372d206f66-FCO
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d62af0cb4342ce58a93ad80240ae2782f1547121200; _ga=GA1.2.289526395.1547121205; _gid=GA1.2.1079086850.1547121205; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 2.42.118.132
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62af0cb4342ce58a93ad80240ae2782f1547121200', '_ga': 'GA1.2.289526395.1547121205', '_gid': 'GA1.2.1079086850.1547121205', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: IT
X-Forwarded-For: 2.42.118.132, 172.68.198.48
Cf-Ray: 496ef24418cc6f66-FCO
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d62af0cb4342ce58a93ad80240ae2782f1547121200; _ga=GA1.2.289526395.1547121205; _gid=GA1.2.1079086850.1547121205; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 2.42.118.132
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62af0cb4342ce58a93ad80240ae2782f1547121200', '_ga': 'GA1.2.289526395.1547121205', '_gid': 'GA1.2.1079086850.1547121205', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: IT
X-Forwarded-For: 2.42.118.132, 172.68.198.48
Cf-Ray: 496ef250bcf56f66-FCO
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d62af0cb4342ce58a93ad80240ae2782f1547121200; _ga=GA1.2.289526395.1547121205; _gid=GA1.2.1079086850.1547121205; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 2.42.118.132
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62af0cb4342ce58a93ad80240ae2782f1547121200', '_ga': 'GA1.2.289526395.1547121205', '_gid': 'GA1.2.1079086850.1547121205', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: IT
X-Forwarded-For: 2.42.118.132, 172.68.198.48
Cf-Ray: 496ef269fda16f66-FCO
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d62af0cb4342ce58a93ad80240ae2782f1547121200; _ga=GA1.2.289526395.1547121205; _gid=GA1.2.1079086850.1547121205; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 2.42.118.132
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62af0cb4342ce58a93ad80240ae2782f1547121200', '_ga': 'GA1.2.289526395.1547121205', '_gid': 'GA1.2.1079086850.1547121205'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: IT
X-Forwarded-For: 2.42.118.132, 172.68.198.48
Cf-Ray: 496ef3524f5d6f66-FCO
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d62af0cb4342ce58a93ad80240ae2782f1547121200; _ga=GA1.2.289526395.1547121205; _gid=GA1.2.1079086850.1547121205
Cf-Connecting-Ip: 2.42.118.132
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30719)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://www.google.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 130.193.24.135, 141.101.88.240
Cf-Ray: 496f2ad54f183bff-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
Dnt: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://www.google.com/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cf-Connecting-Ip: 130.193.24.135
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'dbb77f4d6831167d50a21ac4394b7daed1547040199', '_ga': 'GA1.2.810677435.1547040202', '_gid': 'GA1.2.1607972441.1547040202'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: JP
X-Forwarded-For: 124.215.92.142, 103.22.200.116
Cf-Ray: 496f2da6aeeca53c-NRT
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: ja,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=dbb77f4d6831167d50a21ac4394b7daed1547040199; _ga=GA1.2.810677435.1547040202; _gid=GA1.2.1607972441.1547040202
Cf-Connecting-Ip: 124.215.92.142
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 52.15.139.194, 162.158.79.211
Cf-Ray: 496f351afd7e9f8a-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: */*
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Trident/5.0 Chrome/51.0.2704.106 Safari/537.36 OPR/38.0.2220.41
Cf-Connecting-Ip: 52.15.139.194
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by leoking

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62fe1c2c8fd25e9826350e52e4218d221541210064', '_ga': 'GA1.2.167532993.1541210069', 'session': '.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZjA.-lqYk3X96YH9vCllAQvVq7e_xJQ', '_gid': 'GA1.2.599928363.1546878802', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: 306542578843516929
            Referrer: https://pennydreadfulmagic.com/league/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: BR
X-Forwarded-For: 177.74.113.17, 162.158.62.23
Cf-Ray: 497109fb1954c5ca-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3
Referer: https://pennydreadfulmagic.com/league/
Upgrade-Insecure-Requests: 1
Cookie: __cfduid=d62fe1c2c8fd25e9826350e52e4218d221541210064; _ga=GA1.2.167532993.1541210069; session=.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZjA.-lqYk3X96YH9vCllAQvVq7e_xJQ; _gid=GA1.2.599928363.1546878802; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 177.74.113.17
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by leoking

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62fe1c2c8fd25e9826350e52e4218d221541210064', '_ga': 'GA1.2.167532993.1541210069', 'session': '.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZjA.-lqYk3X96YH9vCllAQvVq7e_xJQ', '_gid': 'GA1.2.599928363.1546878802', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: 306542578843516929
            Referrer: https://pennydreadfulmagic.com/league/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: BR
X-Forwarded-For: 177.74.113.17, 162.158.62.23
Cf-Ray: 49710a04889ac5ca-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3
Referer: https://pennydreadfulmagic.com/league/
Upgrade-Insecure-Requests: 1
Cookie: __cfduid=d62fe1c2c8fd25e9826350e52e4218d221541210064; _ga=GA1.2.167532993.1541210069; session=.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZjA.-lqYk3X96YH9vCllAQvVq7e_xJQ; _gid=GA1.2.599928363.1546878802; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 177.74.113.17
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by leoking

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62fe1c2c8fd25e9826350e52e4218d221541210064', '_ga': 'GA1.2.167532993.1541210069', 'session': '.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZlA.WM9T79k9hpWczgbyjgGJ2K-jZU8', '_gid': 'GA1.2.599928363.1546878802', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: 306542578843516929
            Referrer: https://pennydreadfulmagic.com/league/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: BR
X-Forwarded-For: 177.74.113.17, 162.158.62.23
Cf-Ray: 49710a92d93ac5ca-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3
Referer: https://pennydreadfulmagic.com/league/
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
Cookie: __cfduid=d62fe1c2c8fd25e9826350e52e4218d221541210064; _ga=GA1.2.167532993.1541210069; session=.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZlA.WM9T79k9hpWczgbyjgGJ2K-jZU8; _gid=GA1.2.599928363.1546878802; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 177.74.113.17
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by leoking

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd62fe1c2c8fd25e9826350e52e4218d221541210064', '_ga': 'GA1.2.167532993.1541210069', 'session': '.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZrA.u0_YHYgn1M9byZR8eLZt8sCATtQ', '_gid': 'GA1.2.599928363.1546878802'}
            Endpoint: home
            View Args: {}
            Person: 306542578843516929
            Referrer: https://pennydreadfulmagic.com/league/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: BR
X-Forwarded-For: 177.74.113.17, 162.158.62.23
Cf-Ray: 49710d674971c5ca-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3
Referer: https://pennydreadfulmagic.com/league/
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
Cookie: __cfduid=d62fe1c2c8fd25e9826350e52e4218d221541210064; _ga=GA1.2.167532993.1541210069; session=.eJx9UctuwjAQ_Jc9R1XeCdxoKSJFpGqBVqWqIhMvwSGxU9sRL_HvdZAoh0o9zux6Zmd8gqxBWROOXENfyxYtILRmHPprUimDKNasFvSGmcqFpBkzFHh2GPhuEMWx7wVO2HN7YME_E54VLavo1akSRYG0u0AJflF0IjewoNaFyFqFkpMajViFYst4YRQEafXGzZQmuhvsHmO6EU_xtBked-XqYbv8SGU-n4_LciqWt30ttmginYDkOSp1xbCfTXvNa-K1o5cFi5t0uD_y8STx6m9H7FLzHvcNk6gyYtpxTCA7iqLAvvPtKIhc7zbvCgttP7ZtCySuDbX5NZnjaLB4Tt4XUiaczgbp5M2Tq9XwiHZY5sbEFNqYNJ-mOfMNbH0w3KUnBV8WXGQyfehW4B6JRAlnC_6Upoks0JzJ26o6_wChNJis.DxkZrA.u0_YHYgn1M9byZR8eLZt8sCATtQ; _gid=GA1.2.599928363.1546878802
Cf-Connecting-Ip: 177.74.113.17
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 5.255.250.118, 172.68.246.226
Cf-Ray: 49710fa22b6b8fd5-DME
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)
From: support@search.yandex.ru
Accept: */*
Accept-Language: en, *;q=0.01
Cf-Connecting-Ip: 5.255.250.118
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 3.16.22.104, 162.158.79.211
Cf-Ray: 4971126c3b8fc1c2-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: */*
User-Agent: Mozilla/5.0 (X11; Linux x86_64) Gecko/20100101 Safari/602.1
Cf-Connecting-Ip: 3.16.22.104
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: HEAD
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 163.172.103.81, 141.101.105.104
Cf-Ray: 497115035cca72d1-AMS
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36
Cf-Connecting-Ip: 163.172.103.81
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: HEAD
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: magic.vorpald20.com
Accept-Encoding: gzip
Cf-Ipcountry: DE
X-Forwarded-For: 138.246.253.5, 162.158.89.153
Cf-Ray: 497117677ca696a6-FRA
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36
Cf-Connecting-Ip: 138.246.253.5
Cdn-Loop: cloudflare
X-Forwarded-Host: magic.vorpald20.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by carmandor

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'db69caa6837efbe8f225171f32780f3d51547108667', '_ga': 'GA1.2.1023975177.1547108675', '_gid': 'GA1.2.684814235.1547108675', 'session': '.eJx9UctuwjAQ_Jc9R1UCJo65tYAaaFUailRoVUVWsgRDHEe2U17i3-sgUQ6Vepyd9czs-ARpjVryCisLfasb9IDnUlTQX_HSOJSjFFLlNyxMpnSeCjcCwkISdKIgpJSybsh8Ch78w1Rp0YgyvzqVqigwbxMYVV0UO7TLPJC2UGljUFdcohPLeBsxV9ppKN7YdSc1ltuW-t6_0CyOYnvkm8E03I2b98ZnH8Nku5ktyW3fqi26o07AswyNuWK4p9Owt1fJ8zJODM-2bDITfjKaj56SeHdw73FfC40m5a6foEcoDbosCO56JIoYudFtY6FPIt_3QOPKjda_HrMRfQ0200X02JnLIZkM3qw8LKwaG32sl87DNVq7Yz5dde4fxKr1vRRl4MuDi0xqD-0KPCDXqOHswZ_WLNcFupRVU5bnH5G0mF4.DxkcLA.icvR4x0pWRzR3MOY_-GFMkh7JYM', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: 496412816777936907
            Referrer: https://pennydreadfulmagic.com/league/current/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: IT
X-Forwarded-For: 185.67.237.178, 172.68.198.48
Cf-Ray: 49711a67d9036f1e-FCO
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3
Referer: https://pennydreadfulmagic.com/league/current/
Upgrade-Insecure-Requests: 1
Cookie: __cfduid=db69caa6837efbe8f225171f32780f3d51547108667; _ga=GA1.2.1023975177.1547108675; _gid=GA1.2.684814235.1547108675; session=.eJx9UctuwjAQ_Jc9R1UCJo65tYAaaFUailRoVUVWsgRDHEe2U17i3-sgUQ6Vepyd9czs-ARpjVryCisLfasb9IDnUlTQX_HSOJSjFFLlNyxMpnSeCjcCwkISdKIgpJSybsh8Ch78w1Rp0YgyvzqVqigwbxMYVV0UO7TLPJC2UGljUFdcohPLeBsxV9ppKN7YdSc1ltuW-t6_0CyOYnvkm8E03I2b98ZnH8Nku5ktyW3fqi26o07AswyNuWK4p9Owt1fJ8zJODM-2bDITfjKaj56SeHdw73FfC40m5a6foEcoDbosCO56JIoYudFtY6FPIt_3QOPKjda_HrMRfQ0200X02JnLIZkM3qw8LKwaG32sl87DNVq7Yz5dde4fxKr1vRRl4MuDi0xqD-0KPCDXqOHswZ_WLNcFupRVU5bnH5G0mF4.DxkcLA.icvR4x0pWRzR3MOY_-GFMkh7JYM; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 185.67.237.178
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?locale=sv
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 40.77.167.42, 162.158.78.12
Cf-Ray: 49711dd66df1c19f-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: no-cache
Pragma: no-cache
Accept: */*
From: bingbot(at)microsoft.com
User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
Cf-Connecting-Ip: 40.77.167.42
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by mrsad

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'hide_intro': 'True', '_ga': 'GA1.2.2015604978.1531413598', '__cfduid': 'dd2548daf02fb57656edae1378caa84cc1542470107', 'session': '.eJx9UctuwjAQ_Jc9R5UTEpNwKypQUAulL6pUVWSSTYhIbGo7Kg_x790gAYdKvVia2fHO7uwBkg3qWkiUFnpWN-iAyOpSnkGGdVmr7AJLkyqdJSUx4IaRx_ywyxgPXM7cyAMH_qnIpGjK6tKrUqmokNQooUVFgVk7jVHy1N9l3HOgtoVKGoNairoV19qIjPRKNHblJcYK29JLli7u96tpMFmaRZSOo_f4e4a3YWe4u9t_XPVWrcmudwCRpmjMGYMYi3WD2yKY6GEaCe-1GPWfBnncCacvi4r-43ZTajSJoJzcwPc450EnvKG36wfda72NjtPujDmgMSdqdTF55u74J7eeuh29jfpGdR595PEsfpgvB8WcTCjcDW3zSSnSQcp8R9wpMwNfDpzaJHbXSqCPQqOGowN_IrNCF0hjyqaqjr9ixJmX.DxcvCQ.gwlAAxTot7phZ3crqvMVXv0jKBo'}
            Endpoint: home
            View Args: {}
            Person: 189204870065160192
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: CA
X-Forwarded-For: 184.64.168.181, 162.158.106.164
Cf-Ray: 497130fa086b7a11-SEA
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: en-US,en;q=0.9,es;q=0.8,en-GB;q=0.7
Cookie: hide_intro=True; _ga=GA1.2.2015604978.1531413598; __cfduid=dd2548daf02fb57656edae1378caa84cc1542470107; session=.eJx9UctuwjAQ_Jc9R5UTEpNwKypQUAulL6pUVWSSTYhIbGo7Kg_x790gAYdKvVia2fHO7uwBkg3qWkiUFnpWN-iAyOpSnkGGdVmr7AJLkyqdJSUx4IaRx_ywyxgPXM7cyAMH_qnIpGjK6tKrUqmokNQooUVFgVk7jVHy1N9l3HOgtoVKGoNairoV19qIjPRKNHblJcYK29JLli7u96tpMFmaRZSOo_f4e4a3YWe4u9t_XPVWrcmudwCRpmjMGYMYi3WD2yKY6GEaCe-1GPWfBnncCacvi4r-43ZTajSJoJzcwPc450EnvKG36wfda72NjtPujDmgMSdqdTF55u74J7eeuh29jfpGdR595PEsfpgvB8WcTCjcDW3zSSnSQcp8R9wpMwNfDpzaJHbXSqCPQqOGowN_IrNCF0hjyqaqjr9ixJmX.DxcvCQ.gwlAAxTot7phZ3crqvMVXv0jKBo
Cf-Connecting-Ip: 184.64.168.181
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_20.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by hairyfroglegs

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'_ga': 'GA1.2.2095395922.1517631367', '__cfduid': 'de05e29d5b63f99c7fcf42f5bc5748aed1530064726', 'hide_intro': 'True', '_gid': 'GA1.2.1562510254.1547069625', 'session': '.eJx9UV1rwjAU_S95LiNJP_XNlWlhoLiB041RgrmNwTZpkxSt4n9fFJywhz2ec2_OuefkjMoWTMMUKIfGzvQQIMYbqdC4YrX1iEMjG80fWNqtNryUnkJhGOERwVFKCR1FJCQhCtA_E1WKXtb87lRrIYBfL7Ba3RRjEgWocUKXvQWjWANea8ekGSqjRQ3CehnNerejpXXMXcdknru608tsIz66l-n6baUmOVvg5Wx64KvHvtN78LnOiG23YO0do0OR2WzSn5rT8YiL2BTvkM5yyiXHFZH-PRxbacCWzFdE4jCNM0wpfUp9qmSUPObX1hIcZRgHyEDlqd2vyac-JPHcLTb5vu3WlpH5QF38GiUJK_rOm_hWW5_my9fn_0JWg-duZVn0HaCbTOmG6wp6BmbAoEuA_jbnmBHgr1R9XV9-AJ_4maE.DxhVGA.2ghYFNNAG0BEssdXS8FWaawPGMA'}
            Endpoint: home
            View Args: {}
            Person: 334091047212941313
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 76.177.180.138, 162.158.79.67
Cf-Ray: 497162b138acc1b3-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Purpose: prefetch
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.2.2095395922.1517631367; __cfduid=de05e29d5b63f99c7fcf42f5bc5748aed1530064726; hide_intro=True; _gid=GA1.2.1562510254.1547069625; session=.eJx9UV1rwjAU_S95LiNJP_XNlWlhoLiB041RgrmNwTZpkxSt4n9fFJywhz2ec2_OuefkjMoWTMMUKIfGzvQQIMYbqdC4YrX1iEMjG80fWNqtNryUnkJhGOERwVFKCR1FJCQhCtA_E1WKXtb87lRrIYBfL7Ba3RRjEgWocUKXvQWjWANea8ekGSqjRQ3CehnNerejpXXMXcdknru608tsIz66l-n6baUmOVvg5Wx64KvHvtN78LnOiG23YO0do0OR2WzSn5rT8YiL2BTvkM5yyiXHFZH-PRxbacCWzFdE4jCNM0wpfUp9qmSUPObX1hIcZRgHyEDlqd2vyac-JPHcLTb5vu3WlpH5QF38GiUJK_rOm_hWW5_my9fn_0JWg-duZVn0HaCbTOmG6wp6BmbAoEuA_jbnmBHgr1R9XV9-AJ_4maE.DxhVGA.2ghYFNNAG0BEssdXS8FWaawPGMA
Cf-Connecting-Ip: 76.177.180.138
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_20.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_10.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by hairyfroglegs

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'_ga': 'GA1.2.2095395922.1517631367', '__cfduid': 'de05e29d5b63f99c7fcf42f5bc5748aed1530064726', 'hide_intro': 'True', '_gid': 'GA1.2.1562510254.1547069625', 'session': '.eJx9UV1rwjAU_S95LiNJP_XNlWlhoLiB041RgrmNwTZpkxSt4n9fFJywhz2ec2_OuefkjMoWTMMUKIfGzvQQIMYbqdC4YrX1iEMjG80fWNqtNryUnkJhGOERwVFKCR1FJCQhCtA_E1WKXtb87lRrIYBfL7Ba3RRjEgWocUKXvQWjWANea8ekGSqjRQ3CehnNerejpXXMXcdknru608tsIz66l-n6baUmOVvg5Wx64KvHvtN78LnOiG23YO0do0OR2WzSn5rT8YiL2BTvkM5yyiXHFZH-PRxbacCWzFdE4jCNM0wpfUp9qmSUPObX1hIcZRgHyEDlqd2vyac-JPHcLTb5vu3WlpH5QF38GiUJK_rOm_hWW5_my9fn_0JWg-duZVn0HaCbTOmG6wp6BmbAoEuA_jbnmBHgr1R9XV9-AJ_4maE.DxhVGA.2ghYFNNAG0BEssdXS8FWaawPGMA'}
            Endpoint: home
            View Args: {}
            Person: 334091047212941313
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 76.177.180.138, 162.158.79.67
Cf-Ray: 497162cf1900c1b3-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.2.2095395922.1517631367; __cfduid=de05e29d5b63f99c7fcf42f5bc5748aed1530064726; hide_intro=True; _gid=GA1.2.1562510254.1547069625; session=.eJx9UV1rwjAU_S95LiNJP_XNlWlhoLiB041RgrmNwTZpkxSt4n9fFJywhz2ec2_OuefkjMoWTMMUKIfGzvQQIMYbqdC4YrX1iEMjG80fWNqtNryUnkJhGOERwVFKCR1FJCQhCtA_E1WKXtb87lRrIYBfL7Ba3RRjEgWocUKXvQWjWANea8ekGSqjRQ3CehnNerejpXXMXcdknru608tsIz66l-n6baUmOVvg5Wx64KvHvtN78LnOiG23YO0do0OR2WzSn5rT8YiL2BTvkM5yyiXHFZH-PRxbacCWzFdE4jCNM0wpfUp9qmSUPObX1hIcZRgHyEDlqd2vyac-JPHcLTb5vu3WlpH5QF38GiUJK_rOm_hWW5_my9fn_0JWg-duZVn0HaCbTOmG6wp6BmbAoEuA_jbnmBHgr1R9XV9-AJ_4maE.DxhVGA.2ghYFNNAG0BEssdXS8FWaawPGMA
Cf-Connecting-Ip: 76.177.180.138
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_10.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?locale=pl
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 66.249.73.140, 172.69.68.47
Cf-Ray: 497165a64d5ac800-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: */*
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Cf-Connecting-Ip: 66.249.73.140
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?locale=pl
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 66.249.73.144, 172.69.68.47
Cf-Ray: 4971672b6bd0c808-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: */*
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Cf-Connecting-Ip: 66.249.73.144
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?locale=pl
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 66.249.73.144, 172.69.68.47
Cf-Ray: 497168acecfbc808-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: */*
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Cf-Connecting-Ip: 66.249.73.144
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 18.222.109.213, 162.158.79.109
Cf-Ray: 497168f4d9a823b4-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Chrome/67.0.3396.79 Safari/537.36
Accept: */*
Cf-Connecting-Ip: 18.222.109.213
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 158.106.198.162, 162.158.63.240
Cf-Ray: 49716a1cb9d70efd-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: en-US,en;q=0.9
Cf-Connecting-Ip: 158.106.198.162
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?locale=pl
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 66.249.73.144, 172.69.68.47
Cf-Ray: 49716a31a881c808-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: */*
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Cf-Connecting-Ip: 66.249.73.144
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'de8f117b0c7eede4000edb55c30cc20f51547147120', '_ga': 'GA1.2.1706775183.1547147123', '_gid': 'GA1.2.261644139.1547147123', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/league/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 158.106.198.162, 162.158.63.240
Cf-Ray: 49716c2cedbf0efd-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/league/
Accept-Language: en-US,en;q=0.9
Cookie: __cfduid=de8f117b0c7eede4000edb55c30cc20f51547147120; _ga=GA1.2.1706775183.1547147123; _gid=GA1.2.261644139.1547147123; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 158.106.198.162
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'de8f117b0c7eede4000edb55c30cc20f51547147120', '_ga': 'GA1.2.1706775183.1547147123', '_gid': 'GA1.2.261644139.1547147123', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/decks/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 158.106.198.162, 162.158.63.240
Cf-Ray: 49716c6f7fa00efd-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/decks/
Accept-Language: en-US,en;q=0.9
Cookie: __cfduid=de8f117b0c7eede4000edb55c30cc20f51547147120; _ga=GA1.2.1706775183.1547147123; _gid=GA1.2.261644139.1547147123; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 158.106.198.162
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by 282901521887264768

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'de8f117b0c7eede4000edb55c30cc20f51547147120', '_ga': 'GA1.2.1706775183.1547147123', '_gid': 'GA1.2.261644139.1547147123', '_gat_gtag_UA_109131120_1': '1', 'session': '.eJx9UF1TwjAQ_C_33HGatKSVN6OVooCORXF0nE5oQ4n2A5MUqAz_3YMZ4c3H273d270diLxSNfQXojTSgVxWqmry86xM1ug8VQgBDemlS3qUhGFAmR-wEBz4h6nTolUl8la36NWI1i5paqywEjU3L4MRGV6N129efFcPxtx_7maNnSbT-ajI4bRvmy-JAXcgskwa8zeD9x3xiPKHddL9bKZ-xDqiXj-38Zglll-jXm5XSkuTCgt90vODoEddz73wvIC6jJz5Q33m-qHrOqDlAqHl6QjfJhUJMsbralbEg9v7-SQi68dk-TQM4wkewfessM07_kHWVi06xI6tDXw4cLRJbXdYAS6Flhr2CAtdSExVt2W5_wXeeXlc.DxkpXg.IoVLAYKqstyAWUKp0j3TaW2SyjA'}
            Endpoint: home
            View Args: {}
            Person: 282901521887264768
            Referrer: https://discordapp.com/oauth2/authorize?response_type=code&client_id=338056190779195392&redirect_uri=https%3A%2F%2Fpennydreadfulmagic.com%2Fauthenticate%2Fcallback%2F&scope=identify+guilds&state=DVGL1IAMvZ3HJnGMB4UyWotTSTbLgd
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 158.106.198.162, 162.158.63.240
Cf-Ray: 49716cd05aa00efd-EWR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://discordapp.com/oauth2/authorize?response_type=code&client_id=338056190779195392&redirect_uri=https%3A%2F%2Fpennydreadfulmagic.com%2Fauthenticate%2Fcallback%2F&scope=identify+guilds&state=DVGL1IAMvZ3HJnGMB4UyWotTSTbLgd
Accept-Language: en-US,en;q=0.9
Cookie: __cfduid=de8f117b0c7eede4000edb55c30cc20f51547147120; _ga=GA1.2.1706775183.1547147123; _gid=GA1.2.261644139.1547147123; _gat_gtag_UA_109131120_1=1; session=.eJx9UF1TwjAQ_C_33HGatKSVN6OVooCORXF0nE5oQ4n2A5MUqAz_3YMZ4c3H273d270diLxSNfQXojTSgVxWqmry86xM1ug8VQgBDemlS3qUhGFAmR-wEBz4h6nTolUl8la36NWI1i5paqywEjU3L4MRGV6N129efFcPxtx_7maNnSbT-ajI4bRvmy-JAXcgskwa8zeD9x3xiPKHddL9bKZ-xDqiXj-38Zglll-jXm5XSkuTCgt90vODoEddz73wvIC6jJz5Q33m-qHrOqDlAqHl6QjfJhUJMsbralbEg9v7-SQi68dk-TQM4wkewfessM07_kHWVi06xI6tDXw4cLRJbXdYAS6Flhr2CAtdSExVt2W5_wXeeXlc.DxkpXg.IoVLAYKqstyAWUKp0j3TaW2SyjA
Cf-Connecting-Ip: 158.106.198.162
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 54.92.207.9, 162.158.78.12
Cf-Ray: 49716d489b5623b4-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: HTTPClient/1.0 (2.8.0, ruby 2.0.0 (2014-05-08))
Accept: */*
Date: Thu, 10 Jan 2019 19:07:30 GMT
Cf-Connecting-Ip: 54.92.207.9
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by amgb2

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd88862542ea53594f209730f56d4312881528043629', '_ga': 'GA1.2.1479978537.1528043745', 'hide_intro': 'True', 'session': '.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DxNieA.nv81uzelODllLR-qK3xF2puyPZA'}
            Endpoint: home
            View Args: {}
            Person: 280140312205197313
            Referrer: https://pennydreadfulmagic.com/archetypes/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: GB
X-Forwarded-For: 92.18.203.177, 141.101.99.109
Cf-Ray: 4971773c58e2bc3e-LHR
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/archetypes/
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: __cfduid=d88862542ea53594f209730f56d4312881528043629; _ga=GA1.2.1479978537.1528043745; hide_intro=True; session=.eJx9UctuwjAQ_Befo8p2CCEc-6CHoiIeItCqipzYcVz8QH6oIMS_10ECDpV63Jnd2Z3ZE6j2zCqimfZg7G1gCSBUCQ3GLZEuVpQpoQy9klS4xlhaiYgAPIJoAFOEMcxQkacoBQn4h9EVD0LetKThnNH-AGf0RRFDlCVAeW6q4JjVRLEoRhSvcZw3JPgOV84T38N-MYO5KMrVeoZlbnfDqdisQpBUWjhA935vdiz6OQHSNMy5aw3wNrRlW678hm_DUjYi7eoXuO4mvlA1j_PssBeWuYrEaFCWFtHPCOMHPMizrLjTfVhDOBhBmADL2gh1tx3ILJZTPXl6hPR1bt5-tgc5h8--fP-u2YeNO2Ka-2jmM8YWXyDaY8QuITnwlYCLTOWPfQt4ZMQyC84J-JOYJ5azeKUOUp5_AdSElmc.DxNieA.nv81uzelODllLR-qK3xF2puyPZA
Cf-Connecting-Ip: 92.18.203.177
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'df95642e3c01bdb864da6182a55b826511529004113', '_ga': 'GA1.2.764262102.1529004120', 'hide_intro': 'True', '_gid': 'GA1.2.1862249510.1547146233'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 2600:387:8:11:0:0:0:c2, 108.162.215.48
Cf-Ray: 49717eca49a776e2-LAX
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Android 8.1.0; Tablet; rv:64.0) Gecko/64.0 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Upgrade-Insecure-Requests: 1
Cookie: __cfduid=df95642e3c01bdb864da6182a55b826511529004113; _ga=GA1.2.764262102.1529004120; hide_intro=True; _gid=GA1.2.1862249510.1547146233
Cf-Connecting-Ip: 2600:387:8:11:0:0:0:c2
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd44d9a77335fc551e3c593226495085d51546557814', 'session': 'eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo', 'deck_id': '31014'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 109.11.254.197, 141.101.88.102
Cf-Ray: 49717ece9cbab75f-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d44d9a77335fc551e3c593226495085d51546557814; session=eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo; deck_id=31014
Cf-Connecting-Ip: 109.11.254.197
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd44d9a77335fc551e3c593226495085d51546557814', 'session': 'eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo', 'deck_id': '31014'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/people/318/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 109.11.254.197, 141.101.88.102
Cf-Ray: 49717fed69e9b75f-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/people/318/
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d44d9a77335fc551e3c593226495085d51546557814; session=eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo; deck_id=31014
Cf-Connecting-Ip: 109.11.254.197
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'df95642e3c01bdb864da6182a55b826511529004113', '_ga': 'GA1.2.764262102.1529004120', 'hide_intro': 'True', '_gid': 'GA1.2.1862249510.1547146233', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/rotation/speculation/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 2600:387:8:11:0:0:0:c2, 108.162.215.48
Cf-Ray: 49717ffd3c8176e2-LAX
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Android 8.1.0; Tablet; rv:64.0) Gecko/64.0 Firefox/64.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/rotation/speculation/
Upgrade-Insecure-Requests: 1
Cookie: __cfduid=df95642e3c01bdb864da6182a55b826511529004113; _ga=GA1.2.764262102.1529004120; hide_intro=True; _gid=GA1.2.1862249510.1547146233; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 2600:387:8:11:0:0:0:c2
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd44d9a77335fc551e3c593226495085d51546557814', 'session': 'eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo', 'deck_id': '31014'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/people/carmandor/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 109.11.254.197, 141.101.88.102
Cf-Ray: 497180182b5ab75f-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/people/carmandor/
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d44d9a77335fc551e3c593226495085d51546557814; session=eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo; deck_id=31014
Cf-Connecting-Ip: 109.11.254.197
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd44d9a77335fc551e3c593226495085d51546557814', 'session': 'eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo', 'deck_id': '31014'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 109.11.254.197, 141.101.88.36
Cf-Ray: 4971810dacb1bd5b-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d44d9a77335fc551e3c593226495085d51546557814; session=eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo; deck_id=31014
Cf-Connecting-Ip: 109.11.254.197
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd44d9a77335fc551e3c593226495085d51546557814', 'session': 'eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo', 'deck_id': '31014'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 109.11.254.197, 141.101.88.36
Cf-Ray: 4971825aacd2bd5b-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d44d9a77335fc551e3c593226495085d51546557814; session=eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo; deck_id=31014
Cf-Connecting-Ip: 109.11.254.197
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd44d9a77335fc551e3c593226495085d51546557814', 'session': 'eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo', 'deck_id': '31014'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 46.193.66.27, 141.101.88.102
Cf-Ray: 497183f9fda5b7e9-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d44d9a77335fc551e3c593226495085d51546557814; session=eyJvYXV0aDJfc3RhdGUiOiJySUJ2VUNMSjJWeEthRjhTRE9XR1Z0YXIwblEyODUiLCJ0YXJnZXQiOiJodHRwczovL3Blbm55ZHJlYWRmdWxtYWdpYy5jb20vcGVvcGxlLzI0MDAvIn0.DxEcdA.3pg4JVGY7RaoZY8DbwnClnIHaSo; deck_id=31014
Cf-Connecting-Ip: 46.193.66.27
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: HEAD
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: FR
X-Forwarded-For: 163.172.103.81, 141.101.88.186
Cf-Ray: 4971872bd92fb7e9-CDG
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36
Cf-Connecting-Ip: 163.172.103.81
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by flac0

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'dc2f381085806ba8d88189016017565e61521681072', '_ga': 'GA1.2.1518460170.1521681078', 'hide_intro': 'True', '_gid': 'GA1.2.2002252250.1546748976', 'session': '.eJx9UWFPgzAQ_S_9TEw7YMC-iW5B2Mx0akyMIV0prLEFbMsCLvvvHku2fTDx47139-7euwPKW64VrXlt0czqjjuIFkrUaFZSaaAquBKqKc5kIQxrdJELQJDnkWnoB4QE0cTHXuiFyEH_MHVedUJetGRTVbwYDzBNfVIkYRA4SNmqyTvDdU0VB7FSUoZhvqGd3U1yY6kdYfY6z8wipW2PV6kb3w5Sqbnuk2VKxKK_9tvmi4OfA6KMcWPONTLrp_vnzbphy-HxLchid2OHrU26ONnvVxHM874VmpucQjTE9yY-wdj3byLXI1EUXvkxrSmYxNhBmpcA7S5LNsJ9uEu3_g_LMtu9h-xlKr1SFTj55kMJSyDOFtx8QG7wA1EOgJ1SMujTQSeZ3A5jC4o51Vyjo4P-RGaprjicWXdSHn8BypuW3Q.Dxk05w.jTgHtzlRilbU79vyDewcwWLRN2o'}
            Endpoint: home
            View Args: {}
            Person: 441685711792504848
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: CA
X-Forwarded-For: 64.229.96.81, 162.158.75.186
Cf-Ray: 4971b99ac925c556-ORD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: en-US,en;q=0.9
Cookie: __cfduid=dc2f381085806ba8d88189016017565e61521681072; _ga=GA1.2.1518460170.1521681078; hide_intro=True; _gid=GA1.2.2002252250.1546748976; session=.eJx9UWFPgzAQ_S_9TEw7YMC-iW5B2Mx0akyMIV0prLEFbMsCLvvvHku2fTDx47139-7euwPKW64VrXlt0czqjjuIFkrUaFZSaaAquBKqKc5kIQxrdJELQJDnkWnoB4QE0cTHXuiFyEH_MHVedUJetGRTVbwYDzBNfVIkYRA4SNmqyTvDdU0VB7FSUoZhvqGd3U1yY6kdYfY6z8wipW2PV6kb3w5Sqbnuk2VKxKK_9tvmi4OfA6KMcWPONTLrp_vnzbphy-HxLchid2OHrU26ONnvVxHM874VmpucQjTE9yY-wdj3byLXI1EUXvkxrSmYxNhBmpcA7S5LNsJ9uEu3_g_LMtu9h-xlKr1SFTj55kMJSyDOFtx8QG7wA1EOgJ1SMujTQSeZ3A5jC4o51Vyjo4P-RGaprjicWXdSHn8BypuW3Q.Dxk05w.jTgHtzlRilbU79vyDewcwWLRN2o
Cf-Connecting-Ip: 64.229.96.81
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 18.216.12.224, 162.158.79.103
Cf-Ray: 4971c0d20ca1c1e0-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Safari/602.1
Cf-Connecting-Ip: 18.216.12.224
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'_ga': 'GA1.2.1420705090.1546665257', '__cfduid': 'dbd5acf5a01671b8017f99e691f21deb81546665256'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 2605:a000:1408:8214:82d:30d1:d3a5:306c, 172.68.58.253
Cf-Ray: 4971da1e4ad1c552-ORD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15
Accept-Language: en-us
Cookie: _ga=GA1.2.1420705090.1546665257; __cfduid=dbd5acf5a01671b8017f99e691f21deb81546665256
Cf-Connecting-Ip: 2605:a000:1408:8214:82d:30d1:d3a5:306c
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://www.google.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 96.31.208.171, 172.69.71.20
Cf-Ray: 4971dd99fd599b44-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 OPR/57.0.3098.106
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://www.google.com/
Accept-Language: en-US,en;q=0.9
Cf-Connecting-Ip: 96.31.208.171
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {'__cfduid': 'd1d7e6f7824eaffc5bc73eb493e8483981547151850', '_ga': 'GA1.2.783013179.1547151852', '_gid': 'GA1.2.90304483.1547151852', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 96.31.208.171, 172.69.71.20
Cf-Ray: 4971ddd6ab259af6-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 OPR/57.0.3098.106
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: en-US,en;q=0.9
Cookie: __cfduid=d1d7e6f7824eaffc5bc73eb493e8483981547151850; _ga=GA1.2.783013179.1547151852; _gid=GA1.2.90304483.1547151852; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 96.31.208.171
Cdn-Loop: cloudflare
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /

Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

Reported on decksite by logged_out

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /?
            Cookies: {}
            Endpoint: home
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 54.198.7.54, 162.158.79.187
Cf-Ray: 49720f44aae3c1a4-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: HTTPClient/1.0 (2.8.0, ruby 2.0.0 (2014-05-08))
Accept: */*
Date: Thu, 10 Jan 2019 20:58:04 GMT
Cf-Connecting-Ip: 54.198.7.54
X-Forwarded-Host: pennydreadfulmagic.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

DatabaseException Failed to execute ` SELECT d.id, d.name AS original_name, d.created_date, d.updated_date, SUM(CASE WHEN dm.games > IFNULL(odm.games, 0) THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN dm.games < odm.games THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN dm.games = odm.games THEN 1 ELSE 0 END) AS draws, d.finish, d.archetype_id, d.url AS source_url, d.competition_id, c.name AS competition_name, c.end_date AS competition_end_date, c.top_n AS competition_top_n, ct.name AS competition_type_name, d.identifier, LOWER(IFNULL(IFNULL(IFNULL(p.name, p.mtgo_username), p.mtggoldfish_username), p.tappedout_username)) AS person, p.id AS person_id, p.banned, p.discord_id, d.decklist_hash, d.retired, d.reviewed, s.name AS source_name, IFNULL(a.name, '') AS archetype_name, cache.normalized_name AS name, cache.colors, cache.colored_symbols, cache.legal_formats, ROUND(cache.omw * 100, 2) AS omw, season.id AS season_id, IFNULL(MAX(m.date), d.created_date) AS active_date FROM deck AS d LEFT JOIN person AS p ON d.person_id = p.id LEFT JOIN source AS s ON d.source_id = s.id LEFT JOIN archetype AS a ON d.archetype_id = a.id

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id
    LEFT JOIN
        deck_match AS dm ON d.id = dm.deck_id
    LEFT JOIN
        `match` AS m ON dm.match_id = m.id
    LEFT JOIN
        deck_match AS odm ON odm.deck_id <> d.id AND dm.match_id = odm.match_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN (31105, 31062, 31048, 31027, 30984, 30757, 30745, 30739, 30719, 30694)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` with `[]` because of `(1021, 'Disk full (/tmp/#sql_4513_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")')`

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/cache.py", line 79, in decorated_function
    response = make_response(f(*args, **kwargs))
  File "./decksite/main.py", line 42, in home
    view = Home(ns.all_news(max_items=10), ds.latest_decks(), cs.load_cards(season_id=get_season_id()))
  File "./decksite/data/news.py", line 23, in all_news
    news += tournament_winners(start_date, end_date, max_items)
  File "./decksite/data/news.py", line 91, in tournament_winners
    ds = deck.load_decks(where, limit=f'LIMIT {max_items}')
  File "./decksite/data/deck.py", line 104, in load_decks
    loaded_decks = load_decks_heavy(where)
  File "./decksite/data/deck.py", line 201, in load_decks_heavy
    rows = db().select(sql)
  File "./shared/database.py", line 41, in select
    [_, rows] = self.execute_anything(sql, args)
  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: 9d9e635f8f377b90ab9f7befc2c76de51f225e9b

Labels: decksite; DatabaseException