Help needed in HTTP 500 error for productive game

Game development with Board Game Arena Studio
Post Reply
User avatar
Alex_tgiu
Posts: 59
Joined: 28 December 2020, 22:11

Help needed in HTTP 500 error for productive game

Post by Alex_tgiu »

Hello,
I got several similar bug reports, that my game "Bao la Kiswahili" on BGA gives HTTP 500 errors for people trying to access their running round-based games. I could confirm, that I am not able at the moment to start a new game.
This is very strange for me, as my game version runs for 2.5 years now without problems and thousands of games being played and all of the sudden it does not work without having touched anything or even releasing anything new.
In production log I see this recent error regarding the server error:

Code: Select all

10/02 10:20:17 [error] [T626709558] [209.203.45.188] [95649854/Calvin1000] Error with notification service (code: 500, "Server error: `POST http://ws.boardgamearena.com/bgamsg` resulted in a `500 Internal Server Error` response") first error (message length = 4453). Automatic retry - /table/t626709558 - 6bc44d4cce3f4abb3f3fc877448f902e - dummy","log":"${play....  
12/02 14:50:34 [error] [T628807447] [129.222.145.73] [95653573/gabshugo] Unexpected exception: Game module not found: module.table.tableinfos (BGA service error 1739368234)
#0 /var/tournoi/release/tournoi-250205-1210-gs/www/include/APP_GameFactory.inc.php(16): APP_GameFactory->getNewGameModule('...', false)
#1 /var/tournoi/release/tournoi-250205-1210-gs/www/include/APP_Action.inc.php(403): APP_GameFactory->getNew('...')
#2 /var/tournoi/release/tournoi-250205-1210-gs/www/include/APP_GameAction.inc.php(71): APP_Action->getNew('...')
#3 /var/tournoi/release/tournoi-250205-1210-gs/www/include/APP_GameAction.inc.php(24): APP_GameAction->initGameTableObjects()
#4 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(129): APP_GameAction->__construct()
#5 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(56): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
#6 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Definition/Resolver/ResolverDispatcher.php(60): DI\Definition\Resolver\ObjectCreator->resolve(Object(DI\Definition\ObjectDefinition), Array)
#7 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Container.php(354): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\ObjectDefinition), Array)
#8 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Container.php(184): DI\Container->resolveDefinition(Object(DI\Definition\ObjectDefinition), Array)
#9 /var/tournoi/release/tournoi-250205-1210-gs/www/include/webActionCore.inc.php(191): DI\Container->make('...')
#10 /var/tournoi/release/tournoi-250205-1210-gs/www/index.php(340): launchWebAction('...', '...', '...', false, false, NULL, true, false)
#11 {main}
And also there was a database timeout:

Code: Select all

10/02 08:05:21 [error] [T627396902] [102.182.182.182] [95684045/bao kijana] Error with notification service (code: 0, "cURL error 28: Connection timed out after 1000 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://ws.boardgamearena.com/bgamsg") first error (message length = 4471). Automatic retry - /table/t627396902 - 6bee3230d8c1a9cfaae120f17ee8ca34 - dummy","log":"${play....  
11/02 17:55:10 [error] [T628713175] [165.0.153.241] [93821179/Luvuyo] Error (3024) while processing SQL request: Query execution was interrupted, maximum statement execution time exceeded - Request: SELECT global_id, global_value FROM global WHERE 1   
11/02 17:55:10 [error] [T628713175] [165.0.153.241] [93821179/Luvuyo] Unexpected exception: Maximum execution time exceeded (mysql via TCP/IP) (BGA service error 1739292910)
#0 /var/tournoi/release/tournoi-250205-1210-gs/www/include/APP_DbObject.inc.php(35): Bga\Services\Db->query('...')
#1 /var/tournoi/release/tournoi-250205-1210-gs/www/game/module/table/tableinfos.game.php(127): APP_DbObject::DbQuery('...')
#2 /var/tournoi/release/tournoi-250205-1210-gs/www/game/module/table/tableinfos.game.php(93): TableInfos->getGlobalsFromDB(false)
#3 /var/tournoi/release/tournoi-250205-1210-gs/www/game/module/table/tableinfos.game.php(70): TableInfos->db_load(false)
#4 /var/tournoi/release/tournoi-250205-1210-gs/www/include/APP_GameAction.inc.php(73): TableInfos->get(false)
#5 /var/tournoi/release/tournoi-250205-1210-gs/www/include/APP_GameAction.inc.php(24): APP_GameAction->initGameTableObjects()
#6 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(129): APP_GameAction->__construct()
#7 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(56): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
#8 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Definition/Resolver/ResolverDispatcher.php(60): DI\Definition\Resolver\ObjectCreator->resolve(Object(DI\Definition\ObjectDefinition), Array)
#9 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Container.php(354): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\ObjectDefinition), Array)
#10 /var/tournoi/release/tournoi-250205-1210-gs/vendor/php-di/php-di/src/Container.php(184): DI\Container->resolveDefinition(Object(DI\Definition\ObjectDefinition), Array)
#11 /var/tournoi/release/tournoi-250205-1210-gs/www/include/webActionCore.inc.php(191): DI\Container->make('...')
#12 /var/tournoi/release/tournoi-250205-1210-gs/www/index.php(340): launchWebAction('...', '...', '...', false, false, NULL, true, false)
#13 {main}
When I start a local game in BGA Studio, it also won't start the game and displays this error when the 2nd player joins:

Code: Select all

Unexpected error: Wrong formatted data from gameserver 1 (method: createGame): JSON_ERROR_SYNTAX
Fatal error: Uncaught Error: Typed property Table::$userPreferences must not be accessed before initialization in /var/tournoi/release/tournoi-250213-1514-gs/www/game/module/gameserver/gameserver.game.php:165 Stack trace: #0 /var/tournoi/release/tournoi-250213-1514-gs/www/action/gameserver/gameserver.action.php(61): Gameserver->createGame(Array) #1 /var/tournoi/release/tournoi-250213-1514-gs/www/action/gameserver/gameserver.action.php(69): action_gameserver->callClusterJob('...') #2 /var/tournoi/release/tournoi-250213-1514-gs/www/include/APP_Action.inc.php(495): action_gameserver->createGame() #3 /var/tournoi/release/tournoi-250213-1514-gs/www/include/webActionCore.inc.php(198): APP_Action->performServerAction('...') #4 /var/tournoi/release/tournoi-250213-1514-gs/www/index.php(340): launchWebAction('...', '...', '...', true, false, NULL, true, false) #5 {main} thrown in /var/tournoi/release/tournoi-250213-1514-gs/www/game/module/gameserver/gameserver.game.php on line 165
Has anything changed on BGA which I should have updated or got anything broken in the deployed game?
Has anyone any idea what happens here?
Regards,
Alex
User avatar
thoun
Posts: 1619
Joined: 10 December 2020, 22:25

Re: Help needed in HTTP 500 error for productive game

Post by thoun »

We saw that issue in another game, and the explanation was that the game removed the

Code: Select all

parent::__construct()
call as the first call of the constructor. Is it the case in your game? If yes, adding it back will solve the issue.
User avatar
Alex_tgiu
Posts: 59
Joined: 28 December 2020, 22:11

Re: Help needed in HTTP 500 error for productive game

Post by Alex_tgiu »

thoun wrote: 14 February 2025, 10:41 We saw that issue in another game, and the explanation was that the game removed the

Code: Select all

parent::__construct()
call as the first call of the constructor. Is it the case in your game? If yes, adding it back will solve the issue.
Thanks thoun for the explanation.
Are you referring to the main PHP class (in my case baolakiswahili.game.php) and its __construct function?

The thing is that I haven't touched this game and its deployment for over 2.5 years, so no code change was done.
Has something changed in the framework which requires this now and was not so when I deployed it in 2022?
Or could something be corrupted in the deployment or file system which could be solved by redeployment?
User avatar
thoun
Posts: 1619
Joined: 10 December 2020, 22:25

Re: Help needed in HTTP 500 error for productive game

Post by thoun »

Yes the framework has new things on the constructor. And it reveals the games with no call to parent contructor on the main class. Just add it and it's fixed :) Also auto-inclusion of material file was probably broken because of this missing call.
User avatar
thoun
Posts: 1619
Joined: 10 December 2020, 22:25

Re: Help needed in HTTP 500 error for productive game

Post by thoun »

I made the fix, and probably also fixed options in the same time.
User avatar
Alex_tgiu
Posts: 59
Joined: 28 December 2020, 22:11

Re: Help needed in HTTP 500 error for productive game

Post by Alex_tgiu »

Thanks a lot!
Post Reply

Return to “Developers”