"MySQL server has gone away" when ending game
Posted: 26 September 2020, 08:06
I'm seeing an error frequently, but not always, when ending my game.
It appears that a SQL UPDATE initiated by the platform, to set a global (id=3), is failing.
Is this something my code might be triggering? Or is this a bug in the platform?
This happens after the "endGame" state is triggered, after stats are written.
(If I view the game page, the game appears to have ended correctly and the stats are correct.)
Here's the error as reported to the client:
And here's the last bit of the SQL log:
It appears that a SQL UPDATE initiated by the platform, to set a global (id=3), is failing.
Is this something my code might be triggering? Or is this a bug in the platform?
This happens after the "endGame" state is triggered, after stats are written.
(If I view the game page, the game appears to have ended correctly and the stats are correct.)
Here's the error as reported to the client:
Code: Select all
Server syntax error: lettertycoon/lettertycoon/discardCards.html SyntaxError: Unexpected token '<' / <br />
<b>Warning</b>: Error while sending QUERY packet. PID=1795 in <b>/var/tournoi/release/tournoi-200922-0852-gs/www/include/APP_DbObject.inc.php</b> on line <b>374</b><br />
{"status":"0","error":"Error while processing SQL request: UPDATE global SET global_value=global_value+1 WHERE global_id='3' \nMySQL server has gone away","expected":0,"code":500,"stack":"#0 \/var\/tournoi\/release\/tournoi-200922-0852-gs\/www\/game\/module\/table\/table.game.php(2724): APP_DbObject::DbQuery('UPDATE global S...')\n#1 \/var\/tournoi\/release\/tournoi-200922-0852-gs\/www\/include\/APP_GameAction.inc.php(225): Table->sendNotifications()\n#2 \/var\/tournoi\/release\/tournoi-200922-0852-gs\/www\/include\/APP_GameAction.inc.php(216): APP_GameAction->ajaxResponseWithResult(NULL)\n#3 \/var\/tournoi\/release\/games\/lettertycoon\/999999-9999\/lettertycoon.action.php(134): APP_GameAction->ajaxResponse()\n#4 \/var\/tournoi\/release\/tournoi-200922-0852-gs\/www\/include\/webActionCore.inc.php(135): action_lettertycoon->discardCards()\n#5 \/var\/tournoi\/release\/tournoi-200922-0852-gs\/www\/index.php(230): launchWebAction('lettertycoon', 'action_letterty...', 'discardCards', false, false, NULL, true, false)\n#6 {main}"}Code: Select all
26/09 08:56:05 [info] [T195582] [2330223/jephly1] notifyNow notification. Type = resultsAvailable2
26/09 08:56:05 [info] [T195582] [2330223/jephly1] after jump to nextState2
26/09 08:56:05 [info] [T195582] [2330223/jephly1] after jump to nextState2
26/09 08:56:05 [info] [T195582] [2330223/jephly1] checkZombieTurn2
26/09 08:56:05 [info] [T195582] [2330223/jephly1] action player number = 02
26/09 08:56:05 [info] [T195582] [2330223/jephly1] after jump to nextState2
26/09 08:56:05 [info] [T195582] [2330223/jephly1] Sending notifications2
26/09 08:56:05 [info] [T195582] [2330223/jephly1] 0.0028610229492188 UPDATE global SET global_value=global_value+1 WHERE global_id='3' 2
26/09 08:56:05 [error] [T195582] [2330223/jephly1] Error (2006) while processing SQL request: MySQL server has gone away - Request: UPDATE global SET global_value=global_value+1 WHERE global_id='3' 2
26/09 08:56:05 [info] [T195582] [2330223/jephly1] DB rollback: action cancelled2
26/09 08:56:05 [error] [T195582] [2330223/jephly1] Unexpected exception: Error while processing SQL request: UPDATE global SET global_value=global_value+1 WHERE global_id='3' M
MySQL server has gone away (BGA service error 1601103365)#
#0 /var/tournoi/release/tournoi-200922-0852-gs/www/game/module/table/table.game.php(2724): APP_DbObject::DbQuery('UPDATE global S...')#
#1 /var/tournoi/release/tournoi-200922-0852-gs/www/include/APP_GameAction.inc.php(225): Table->sendNotifications()#
#2 /var/tournoi/release/tournoi-200922-0852-gs/www/include/APP_GameAction.inc.php(216): APP_GameAction->ajaxResponseWithResult(NULL)#
#3 /var/tournoi/release/games/lettertycoon/999999-9999/lettertycoon.action.php(134): APP_GameAction->ajaxResponse()#
#4 /var/tournoi/release/tournoi-200922-0852-gs/www/include/webActionCore.inc.php(135): action_lettertycoon->discardCards()#
#5 /var/tournoi/release/tournoi-200922-0852-gs/www/index.php(230): launchWebAction('lettertycoon', 'action_letterty...', 'discardCards', false, false, NULL, true, false)#
#6 {main}h
http://1.studio.boardgamearena.com/1/lettertycoon/lettertycoon/discardCards.html?card_ids=61&lock=180d1ab5-4a7d-4ce8-84ba-b9ed308a87bc&table=195582&testuser=2330223&dojo.preventCache=16011033495062
26/09 08:56:05 [notice] [T195582] [2330223/jephly1] ER-500 15838 d5 c2 e15742 m0 I334 A0 V0 T0 /1/lettertycoon/lettertycoon/discardCards.html?card_ids=61&lock=180d1ab5-4a7d-4ce8-84ba-b9ed308a87bc&table=195582&testuser=2330223&dojo.preventCache=1601103349506