PennyDreadfulMTG / perf-reports

2 stars 2 forks source link

500 error at /signup/ #42541

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 (31132, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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: /signup/?
            Cookies: {'__cfduid': 'd50b1979822b944e4a9dad69ea52d99291547125125', '_ga': 'GA1.2.1921068981.1547125130', '_gid': 'GA1.2.64672235.1547125130'}
            Endpoint: signup
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 173.244.44.61, 172.68.141.246
Cf-Ray: 496f8f10687a6d90-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/
Accept-Language: ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d50b1979822b944e4a9dad69ea52d99291547125125; _ga=GA1.2.1921068981.1547125130; _gid=GA1.2.64672235.1547125130
Cf-Connecting-Ip: 173.244.44.61
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 (31132, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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: /signup/?
            Cookies: {'__cfduid': 'd50b1979822b944e4a9dad69ea52d99291547125125', '_ga': 'GA1.2.1921068981.1547125130', '_gid': 'GA1.2.64672235.1547125130', '_gat_gtag_UA_109131120_1': '1'}
            Endpoint: signup
            View Args: {}
            Person: logged_out
            Referrer: https://pennydreadfulmagic.com/signup/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 173.244.44.61, 172.68.141.246
Cf-Ray: 496f8f686d676d90-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/signup/
Accept-Language: ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d50b1979822b944e4a9dad69ea52d99291547125125; _ga=GA1.2.1921068981.1547125130; _gid=GA1.2.64672235.1547125130; _gat_gtag_UA_109131120_1=1
Cf-Connecting-Ip: 173.244.44.61
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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 naifaux

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /signup/?
            Cookies: {'__cfduid': 'd50b1979822b944e4a9dad69ea52d99291547125125', '_ga': 'GA1.2.1921068981.1547125130', '_gid': 'GA1.2.64672235.1547125130', 'session': '.eJx9UNFugkAQ_Jd9Jg1wAuqjWtOiNlTKQ2kacsABp8DRu6PFGv_d1aT61seZ2d2Z2SPQvOEtTAtaK2ZAzhreiPyOucqEzBOOFFiEmDZxJ65rWZ45GhMCBvyjtEnZ8xp1LXu8JWivKztRmmqGO0H6GtorTnfvfrV8_K3jbbryzOV8U2TrIoXbvBZ7hgGPQLOMKfWHoQnjaGeOvqtF_rXPuTeIcHjWQz-Jgpa2uM-GjkumEqphajkjzyO2Q9yHiUMse3yXL-1dzGyaBkhWIFXdPMJF8FO5XcoX_rx8EqkoNm9rf5vO4iCyX9ADv9NhmQ98A2s1Lw7IXUsr-DTgeibRh8sIzBiVTMIJaSpLhqHavq5PZ6l0exs.DxjdOQ.x3cX6dDIOM4u00l3NAaN86iw4Mg'}
            Endpoint: signup
            View Args: {}
            Person: 133023696611704833
            Referrer: https://discordapp.com/oauth2/authorize?response_type=code&client_id=338056190779195392&redirect_uri=https%3A%2F%2Fpennydreadfulmagic.com%2Fauthenticate%2Fcallback%2F&scope=identify+guilds&state=PbQS2KiajYJhFEzlZRbK70FCMfcLfb
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 173.244.44.61, 172.68.141.246
Cf-Ray: 496f90e6bc606d90-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://discordapp.com/oauth2/authorize?response_type=code&client_id=338056190779195392&redirect_uri=https%3A%2F%2Fpennydreadfulmagic.com%2Fauthenticate%2Fcallback%2F&scope=identify+guilds&state=PbQS2KiajYJhFEzlZRbK70FCMfcLfb
Accept-Language: ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d50b1979822b944e4a9dad69ea52d99291547125125; _ga=GA1.2.1921068981.1547125130; _gid=GA1.2.64672235.1547125130; session=.eJx9UNFugkAQ_Jd9Jg1wAuqjWtOiNlTKQ2kacsABp8DRu6PFGv_d1aT61seZ2d2Z2SPQvOEtTAtaK2ZAzhreiPyOucqEzBOOFFiEmDZxJ65rWZ45GhMCBvyjtEnZ8xp1LXu8JWivKztRmmqGO0H6GtorTnfvfrV8_K3jbbryzOV8U2TrIoXbvBZ7hgGPQLOMKfWHoQnjaGeOvqtF_rXPuTeIcHjWQz-Jgpa2uM-GjkumEqphajkjzyO2Q9yHiUMse3yXL-1dzGyaBkhWIFXdPMJF8FO5XcoX_rx8EqkoNm9rf5vO4iCyX9ADv9NhmQ98A2s1Lw7IXUsr-DTgeibRh8sIzBiVTMIJaSpLhqHavq5PZ6l0exs.DxjdOQ.x3cX6dDIOM4u00l3NAaN86iw4Mg
Cf-Connecting-Ip: 173.244.44.61
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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31144, 31012, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 naifaux

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /signup/?
            Cookies: {'__cfduid': 'd50b1979822b944e4a9dad69ea52d99291547125125', '_ga': 'GA1.2.1921068981.1547125130', '_gid': 'GA1.2.64672235.1547125130', '_gat_gtag_UA_109131120_1': '1', 'session': '.eJx9UctuwjAQ_Jc9R1UekBCOQFHLo0pJOZSqipzYSQyJndpOG4r4926QKIdKPc7semZnfIKkYaomggkDY6NaZgGhNRcwzkmlEVFW81rSG-Y6k4omHClwPM92PT_0fccJ7MHI88CCfyYiKVpe0atTJYuC0f4CLcVF0QndwILaFDJpNVOC1AzFBOE5aTtUkKQ1pZtoQ0w_iNLn2F1ysn9dlPP772q3SZeBPZ-u82yVp7d9Iw8MI52AZBnT-oqhjnfbvT34LGf040B50Mm4ezRdG24jQQS-Z13DFdMJwXac4SAIPHfo-Xfh0HPc0W3c9-VjStu2QLEcqfLXI55FX6XfpHy2mBYPMpX5-mW12KSTXbR1n9AD-2wwzBsWh7_A8yNyl5o0vFtwkUnMsV-BCSOKKThb8KczQ1TB8ErRVtX5B7J3mE8.DxjdQA.xkIe1Nlvu-K5TnN_bdSx-cviNyY'}
            Endpoint: signup
            View Args: {}
            Person: 133023696611704833
            Referrer: https://pennydreadfulmagic.com/signup/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 173.244.44.61, 172.68.141.246
Cf-Ray: 496f9127ad586d90-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/signup/
Accept-Language: ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d50b1979822b944e4a9dad69ea52d99291547125125; _ga=GA1.2.1921068981.1547125130; _gid=GA1.2.64672235.1547125130; _gat_gtag_UA_109131120_1=1; session=.eJx9UctuwjAQ_Jc9R1UekBCOQFHLo0pJOZSqipzYSQyJndpOG4r4926QKIdKPc7semZnfIKkYaomggkDY6NaZgGhNRcwzkmlEVFW81rSG-Y6k4omHClwPM92PT_0fccJ7MHI88CCfyYiKVpe0atTJYuC0f4CLcVF0QndwILaFDJpNVOC1AzFBOE5aTtUkKQ1pZtoQ0w_iNLn2F1ysn9dlPP772q3SZeBPZ-u82yVp7d9Iw8MI52AZBnT-oqhjnfbvT34LGf040B50Mm4ezRdG24jQQS-Z13DFdMJwXac4SAIPHfo-Xfh0HPc0W3c9-VjStu2QLEcqfLXI55FX6XfpHy2mBYPMpX5-mW12KSTXbR1n9AD-2wwzBsWh7_A8yNyl5o0vFtwkUnMsV-BCSOKKThb8KczQ1TB8ErRVtX5B7J3mE8.DxjdQA.xkIe1Nlvu-K5TnN_bdSx-cviNyY
Cf-Connecting-Ip: 173.244.44.61
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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31144, 31012, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31144, 31012, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 naifaux

            --------------------------------------------------------------------------------
            Request Method: GET
            Path: /signup/?
            Cookies: {'__cfduid': 'd50b1979822b944e4a9dad69ea52d99291547125125', '_ga': 'GA1.2.1921068981.1547125130', '_gid': 'GA1.2.64672235.1547125130', '_gat_gtag_UA_109131120_1': '1', 'session': '.eJx9UctuwjAQ_Jc9R1UekBCOQFHLo0pJOZSqipzYSQyJndpOG4r4926QKIdKPc7semZnfIKkYaomggkDY6NaZgGhNRcwzkmlEVFW81rSG-Y6k4omHClwPM92PT_0fccJ7MHI88CCfyYiKVpe0atTJYuC0f4CLcVF0QndwILaFDJpNVOC1AzFBOE5aTtUkKQ1pZtoQ0w_iNLn2F1ysn9dlPP772q3SZeBPZ-u82yVp7d9Iw8MI52AZBnT-oqhjnfbvT34LGf040B50Mm4ezRdG24jQQS-Z13DFdMJwXac4SAIPHfo-Xfh0HPc0W3c9-VjStu2QLEcqfLXI55FX6XfpHy2mBYPMpX5-mW12KSTXbR1n9AD-2wwzBsWh7_A8yNyl5o0vFtwkUnMsV-BCSOKKThb8KczQ1TB8ErRVtX5B7J3mE8.DxjdYA.YzsOWHamNlU6X5aDFvtjUIYztSY'}
            Endpoint: signup
            View Args: {}
            Person: 133023696611704833
            Referrer: https://pennydreadfulmagic.com/league/
            Request Data: {}
Host: pennydreadfulmagic.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 173.244.44.61, 172.68.141.246
Cf-Ray: 496f91ea79386d90-SJC
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://pennydreadfulmagic.com/league/
Accept-Language: ja-JP,ja;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=d50b1979822b944e4a9dad69ea52d99291547125125; _ga=GA1.2.1921068981.1547125130; _gid=GA1.2.64672235.1547125130; _gat_gtag_UA_109131120_1=1; session=.eJx9UctuwjAQ_Jc9R1UekBCOQFHLo0pJOZSqipzYSQyJndpOG4r4926QKIdKPc7semZnfIKkYaomggkDY6NaZgGhNRcwzkmlEVFW81rSG-Y6k4omHClwPM92PT_0fccJ7MHI88CCfyYiKVpe0atTJYuC0f4CLcVF0QndwILaFDJpNVOC1AzFBOE5aTtUkKQ1pZtoQ0w_iNLn2F1ysn9dlPP772q3SZeBPZ-u82yVp7d9Iw8MI52AZBnT-oqhjnfbvT34LGf040B50Mm4ezRdG24jQQS-Z13DFdMJwXac4SAIPHfo-Xfh0HPc0W3c9-VjStu2QLEcqfLXI55FX6XfpHy2mBYPMpX5-mW12KSTXbR1n9AD-2wwzBsWh7_A8yNyl5o0vFtwkUnMsV-BCSOKKThb8KczQ1TB8ErRVtX5B7J3mE8.DxjdYA.YzsOWHamNlU6X5aDFvtjUIYztSY
Cf-Connecting-Ip: 173.244.44.61
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 (31125, 31132, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31144, 31012, 31143, 31140, 31138, 31136, 31137, 31139, 31134, 31135, 31112, 31072, 31126, 30996, 31123, 31014, 31120, 31117, 30924, 31051, 31079, 30971, 31091, 31074, 31089, 31087, 31086, 31076, 31077, 30998, 31073, 30954, 31055, 31053, 31050, 31049, 30875, 31015, 31016, 30918, 31008, 31007, 30972, 30969, 30946, 30957, 30955, 30938, 30933, 30917, 30914, 30886, 30879, 30864)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31017, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31134, 31116, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31120, 31035, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31084, 31079, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30998, 30999, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31019, 31031, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31005, 31007, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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: /signup/?
            Cookies: {}
            Endpoint: signup
            View Args: {}
            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: 4971621afe8079f3-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 (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31017, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31134, 31116, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31120, 31035, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31084, 31079, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30998, 30999, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31019, 31031, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31005, 31007, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31144, 31012, 31143, 31017, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31134, 31116, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31109, 31106, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31120, 31035, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30998, 30999, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31019, 31031, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 30965, 31036, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31005, 31007, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30913, 30943, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30868, 30910, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30922, 30901, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30903, 30899, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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: /signup/?
            Cookies: {'_gat_gtag_UA_109131120_1': '1', '_ga': 'GA1.1.364826902.1547168487', '_gid': 'GA1.1.1527237855.1547168487'}
            Endpoint: signup
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: magic.vorpald20.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 162.158.64.137, 162.158.79.7
Cf-Ray: 4973741f917423de-IAD
X-Forwarded-Proto: http
Cf-Visitor: {"scheme":"http"}
User-Agent: Mozilla/5.0 (compatible; CloudFlare-AlwaysOnline/1.0; +http://www.cloudflare.com/always-online) AppleWebKit/534.34
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Cookie: _gat_gtag_UA_109131120_1=1; _ga=GA1.1.364826902.1547168487; _gid=GA1.1.1527237855.1547168487
Accept-Language: en,*
Cf-Connecting-Ip: 162.158.64.137
Cdn-Loop: cloudflare
X-Forwarded-Host: magic.vorpald20.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

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

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

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

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

    WHERE
        (d.id IN (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31144, 31012, 31143, 31017, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31134, 31116, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31109, 31106, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31120, 31035, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30998, 30999, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31019, 31031, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 30965, 31036, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31005, 31007, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30913, 30943, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30868, 30910, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30922, 30901, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30903, 30899, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31017, 31143, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 30952, 31038, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30972, 30902, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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: /signup/?
            Cookies: {'_gat_gtag_UA_109131120_1': '1', '_ga': 'GA1.1.134077265.1547168487', '_gid': 'GA1.1.11130014.1547168487'}
            Endpoint: signup
            View Args: {}
            Person: logged_out
            Referrer: None
            Request Data: {}
Host: magic.vorpald20.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 162.158.68.212, 162.158.79.7
Cf-Ray: 4973741ff8d956cf-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (compatible; CloudFlare-AlwaysOnline/1.0; +http://www.cloudflare.com/always-online) AppleWebKit/534.34
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Cookie: _gat_gtag_UA_109131120_1=1; _ga=GA1.1.134077265.1547168487; _gid=GA1.1.11130014.1547168487
Accept-Language: en,*
Cf-Connecting-Ip: 162.158.68.212
Cdn-Loop: cloudflare
X-Forwarded-Host: magic.vorpald20.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

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

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

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

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

    WHERE
        (d.id IN (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31017, 31143, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 30952, 31038, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30972, 30902, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31017, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31134, 31116, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31120, 31035, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31084, 31079, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30998, 30999, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31019, 31031, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31005, 31007, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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: /signup/?
            Cookies: {'_gat_gtag_UA_109131120_1': '1', '_ga': 'GA1.1.364826902.1547168487', '_gid': 'GA1.1.1527237855.1547168487'}
            Endpoint: signup
            View Args: {}
            Person: logged_out
            Referrer: http://magic.vorpald20.com/signup/
            Request Data: {}
Host: magic.vorpald20.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 162.158.64.137, 162.158.79.7
Cf-Ray: 4973742c343723de-IAD
X-Forwarded-Proto: http
Cf-Visitor: {"scheme":"http"}
User-Agent: Mozilla/5.0 (compatible; CloudFlare-AlwaysOnline/1.0; +http://www.cloudflare.com/always-online) AppleWebKit/534.34
Accept: */*
Referer: http://magic.vorpald20.com/signup/
Cookie: _gat_gtag_UA_109131120_1=1; _ga=GA1.1.364826902.1547168487; _gid=GA1.1.1527237855.1547168487
Accept-Language: en,*
Cf-Connecting-Ip: 162.158.64.137
Cdn-Loop: cloudflare
X-Forwarded-Host: magic.vorpald20.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

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

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

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

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

    WHERE
        (d.id IN (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31017, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31134, 31116, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31120, 31035, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31084, 31079, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30998, 30999, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31019, 31031, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31005, 31007, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31017, 31143, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 30952, 31038, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30972, 30902, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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: /signup/?
            Cookies: {'_gat_gtag_UA_109131120_1': '1', '_ga': 'GA1.1.134077265.1547168487', '_gid': 'GA1.1.11130014.1547168487'}
            Endpoint: signup
            View Args: {}
            Person: logged_out
            Referrer: https://magic.vorpald20.com/signup/
            Request Data: {}
Host: magic.vorpald20.com
Accept-Encoding: gzip
Cf-Ipcountry: US
X-Forwarded-For: 162.158.68.212, 162.158.79.7
Cf-Ray: 4973742cdc8556cf-IAD
X-Forwarded-Proto: https
Cf-Visitor: {"scheme":"https"}
User-Agent: Mozilla/5.0 (compatible; CloudFlare-AlwaysOnline/1.0; +http://www.cloudflare.com/always-online) AppleWebKit/534.34
Accept: */*
Referer: https://magic.vorpald20.com/signup/
Cookie: _gat_gtag_UA_109131120_1=1; _ga=GA1.1.134077265.1547168487; _gid=GA1.1.11130014.1547168487
Accept-Language: en,*
Cf-Connecting-Ip: 162.158.68.212
Cdn-Loop: cloudflare
X-Forwarded-Host: magic.vorpald20.com
X-Forwarded-Server: pennydreadfulmagic.com
Connection: Keep-Alive

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

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

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

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

    WHERE
        (d.id IN (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31017, 31143, 31090, 31115, 31140, 31138, 31136, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31106, 31109, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 30952, 31038, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30972, 30902, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30925, 30928, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31126, 31132, 31125, 31127, 31141, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31017, 31090, 31115, 31140, 31136, 31138, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31109, 31106, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 31080, 30924, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31076, 31083, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 30965, 31036, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31011, 31001, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30913, 30943, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30868, 30910, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30928, 30925, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30922, 30901, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

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

Reported on decksite by logged_out

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

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

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

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

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

    WHERE
        (d.id IN (31126, 31132, 31125, 31127, 31141, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31143, 31017, 31090, 31115, 31140, 31136, 31138, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31129, 31072, 31109, 31106, 30996, 31110, 31124, 31118, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 31080, 30924, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31076, 31083, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 31038, 30952, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 30965, 31036, 31018, 31034, 31009, 30997, 30875, 30958, 31013, 30964, 31015, 31016, 30865, 30968, 30918, 31011, 31001, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30902, 30972, 30966, 30967, 30969, 30953, 30913, 30943, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30868, 30910, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30940, 30939, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30928, 30925, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30922, 30901, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30890, 30889, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /signup/

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 (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31017, 31143, 31090, 31115, 31140, 31136, 31138, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31072, 31129, 31106, 31109, 30996, 31110, 31118, 31124, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 30952, 31038, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 31013, 30958, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30972, 30902, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30939, 30940, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30928, 30925, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30889, 30890, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

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

Reported on decksite by logged_out

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

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

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

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

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

    WHERE
        (d.id IN (31132, 31126, 31125, 31141, 31127, 31147, 31128, 31146, 31142, 31131, 31145, 31012, 31144, 31017, 31143, 31090, 31115, 31140, 31136, 31138, 31114, 31137, 31139, 31116, 31134, 31135, 31133, 30919, 31122, 31112, 31130, 31072, 31129, 31106, 31109, 30996, 31110, 31118, 31124, 31123, 31014, 31121, 31035, 31120, 31075, 31107, 31117, 31032, 30924, 31080, 31088, 31108, 31051, 31079, 31084, 30897, 30971, 31091, 31074, 31089, 31087, 31071, 31086, 31083, 31076, 31037, 31082, 31078, 31077, 30999, 30998, 31073, 30954, 31070, 30952, 31038, 31052, 31055, 31033, 31054, 31031, 31019, 31030, 31040, 31053, 30936, 31050, 31006, 31049, 31039, 31036, 30965, 31018, 31034, 31009, 30997, 30875, 31013, 30958, 30964, 31015, 31016, 30865, 30968, 30918, 31001, 31011, 31010, 31008, 30976, 31007, 31005, 30861, 30931, 30995, 31000, 30949, 30979, 30926, 30970, 30888, 30950, 30980, 30947, 30977, 30929, 30973, 30975, 30961, 30974, 30972, 30902, 30966, 30967, 30969, 30953, 30943, 30913, 30885, 30946, 30878, 30962, 30959, 30960, 30948, 30956, 30935, 30957, 30910, 30868, 30909, 30955, 30951, 30942, 30945, 30937, 30923, 30939, 30940, 30944, 30934, 30906, 30941, 30930, 30938, 30933, 30916, 30928, 30925, 30884, 30900, 30927, 30908, 30921, 30915, 30920, 30901, 30922, 30917, 30911, 30869, 30892, 30867, 30882, 30914, 30912, 30904, 30905, 30874, 30899, 30903, 30873, 30898, 30896, 30887, 30891, 30893, 30889, 30890, 30863, 30883, 30880, 30886, 30876, 30879, 30872, 30877, 30871, 30870, 30866, 30864, 30860)) 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 299, in signup
    view = SignUp(form, auth.person_id())
  File "./decksite/views/decklist_form.py", line 12, in __init__
    super().__init__(form)
  File "./decksite/views/league_form.py", line 11, in __init__
    self.league = league.active_league()
  File "./decksite/league.py", line 284, in active_league
    leagues = competition.load_competitions(where)
  File "./decksite/data/competition.py", line 98, in load_competitions
    set_decks(competitions)
  File "./decksite/data/competition.py", line 106, in set_decks
    decks = deck.load_decks(where)
  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: 3ee116098a831190210fd4200fd3a11a0541b740

Labels: decksite; DatabaseException