PennyDreadfulMTG / perf-reports

2 stars 7 forks source link

500 error at /export/27405/ #42532

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 (27405)) 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: /export/27405/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '27405'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 40.77.167.179, 172.69.62.228
Cf-Ray: 496ee89bdf9f23b4-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.179
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 (27405)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

vorpal-buildbot commented 5 years ago

500 error at /export/23851/

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 (23851)) 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: /export/23851/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '23851'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 40.77.167.41, 172.69.62.24
Cf-Ray: 496eed2ebdd2c1b8-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.41
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 (23851)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/27319/

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 (27319)) 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: /export/27319/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '27319'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 207.46.13.205, 162.158.106.104
Cf-Ray: 4970cd0f6c1179c7-SEA
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: 207.46.13.205
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 (27319)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/18409/

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 (18409)) 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: /export/18409/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '18409'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 157.55.39.175, 108.162.246.205
Cf-Ray: 4970dd6578837955-SEA
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: 157.55.39.175
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 (18409)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/26578/

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 (26578)) 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: /export/26578/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '26578'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 207.46.13.128, 108.162.246.37
Cf-Ray: 49711935fabfbb60-SEA
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: 207.46.13.128
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 (26578)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/8458/

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 (8458)) 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: /export/8458/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '8458'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 46.229.168.131, 172.69.62.24
Cf-Ray: 49711b835e5f9f72-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html
User-Agent: Mozilla/5.0 (compatible; SemrushBot/3~bl; +http://www.semrush.com/bot.html)
Cf-Connecting-Ip: 46.229.168.131
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 (8458)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/29168/

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 (29168)) 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: /export/29168/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '29168'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 40.77.167.137, 162.158.79.7
Cf-Ray: 497160eb0b75c1c7-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.137
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 (29168)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/27382/

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 (27382)) 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: /export/27382/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '27382'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 157.55.39.175, 162.158.106.20
Cf-Ray: 49716e6bdfe07a05-SEA
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: 157.55.39.175
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 (27382)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/8480/

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 (8480)) 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: /export/8480/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '8480'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: RU
X-Forwarded-For: 93.158.166.151, 172.68.244.20
Cf-Ray: 49718c23ed458fd5-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: 93.158.166.151
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 (8480)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/23792/

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 (23792)) 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: /export/23792/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '23792'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 157.55.39.132, 108.162.246.235
Cf-Ray: 4971c0e469d2bb30-SEA
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: 157.55.39.132
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 (23792)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/14085/

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 (14085)) 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: /export/14085/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '14085'}
            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.79.187
Cf-Ray: 4971c5d59a7cc1a9-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Cache-Control: no-cache
Pragma: no-cache
Accept: */*
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 (14085)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/24897/

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 (24897)) 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: /export/24897/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '24897'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 157.55.39.121, 108.162.246.181
Cf-Ray: 4971df32f9b029f5-SEA
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: 157.55.39.121
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 (24897)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/20803/

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 (20803)) 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: /export/20803/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '20803'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: RU
X-Forwarded-For: 93.158.166.129, 172.68.246.142
Cf-Ray: 49722765acec8fdb-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: 93.158.166.129
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 (20803)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/25679/

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 (25679)) 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: /export/25679/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '25679'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 157.55.39.175, 162.158.106.164
Cf-Ray: 49728812ac937979-SEA
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: 157.55.39.175
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 (25679)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/6560/

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 (6560)) 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: /export/6560/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '6560'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 66.249.73.158, 172.69.69.186
Cf-Ray: 4972906189629b7b-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Cf-Connecting-Ip: 66.249.73.158
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 (6560)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/3511/

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 (3511)) 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: /export/3511/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '3511'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 66.249.73.133, 172.69.69.108
Cf-Ray: 4972cac78e6c9b32-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Cf-Connecting-Ip: 66.249.73.133
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 (3511)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/8158/

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 (8158)) 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: /export/8158/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '8158'}
            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.180
Cf-Ray: 4972e570eeb757a1-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
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 (8158)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/25263/

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 (25263)) 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: /export/25263/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '25263'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 157.55.39.175, 108.162.246.253
Cf-Ray: 497379d89cc5bb18-SEA
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: 157.55.39.175
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 (25263)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/27403/

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 (27403)) 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: /export/27403/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '27403'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 207.46.13.163, 162.158.106.62
Cf-Ray: 4973804bad3abb4e-SEA
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: 207.46.13.163
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 (27403)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /export/31108/

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 (31108)) 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: /export/31108/?
            Cookies: {}
            Endpoint: export
            View Args: {'deck_id': '31108'}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 66.249.73.144, 108.162.221.83
Cf-Ray: 4973889329a8c7e8-DFW
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
From: googlebot(at)googlebot.com
User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (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 (31108)) 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/auth.py", line 70, in decorated_function
    return f(*args, **kwargs)
  File "./decksite/main.py", line 244, in export
    d = ds.load_deck(deck_id)
  File "./decksite/data/deck.py", line 25, in load_deck
    return guarantee.exactly_one(load_decks('d.id = {deck_id}'.format(deck_id=sqlescape(deck_id))))
  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: a381279e605784520d351dc54a3857315ddfa90f

Labels: Search Engine; decksite; DatabaseException