downforacross / downforacross.com

Web frontend for downforacross.com -- continuation of stevenhao/crosswordsio
https://downforacrosscom.downforacross1.now.sh
MIT License
229 stars 90 forks source link

Puzzles not being created #158

Closed multimeric closed 3 years ago

multimeric commented 3 years ago

If I open a new puzzle, the website gets stuck on "Creating game...", and if I come back to that game, the page is blank: image

The console logs doesn't reveal anything amiss:

Game.js:103 initialize game
Game.js:104 listening ws
game.js:169 subscribed
getSocket.ts:35 Connecting to https://api.foracross.com
user.js:21 Your id is 46327c8
getSocket.ts:23 [ws connect] undefined
getSocket.ts:26 [ws connect] undefined
getSocket.ts:29 [ws ping] 1611568361867
getSocket.ts:32 [ws pong] 1611568362056
getSocket.ts:29 [ws ping] 1611568364056
getSocket.ts:32 [ws pong] 1611568364244
getSocket.ts:29 [ws ping] 1611568366244
getSocket.ts:32 [ws pong] 1611568366436
getSocket.ts:29 [ws ping] 1611568368917
getSocket.ts:32 [ws pong] 1611568369103
getSocket.ts:29 [ws ping] 1611568371104
getSocket.ts:32 [ws pong] 1611568371294
getSocket.ts:29 [ws ping] 1611568373296
getSocket.ts:32 [ws pong] 1611568373484
cpburke91 commented 3 years ago

I am encountering the same issue as of this morning.

auntiviris commented 3 years ago

Same here. Issue is affecting me and several friends.

jvigilan commented 3 years ago

Same here - is anyone looking at fixing this? Seems to be hung on an api call…

Maybe roll back the recent change….

image

stevenhao commented 3 years ago

That is strange. I restarted the server and game creation is working again. I suspect that some of the recent backend changes might've overloaded the api server, perhaps causing OOM issues and crashing the process entirely.

I'll look into running the api server in a separate deployment (considering https://vercel.com/docs/serverless-functions/introduction) to prevent this from happening.

stevenhao commented 3 years ago

Seems like the issue occurs when POST /api/record_solve is hit. i'll look into this more later in the day, going to make a change to stub that route for now and close this issue.

stevenhao commented 3 years ago

Bug was introduced by me last night, forgot to close a db connection in a route handler 😨. Discussion here: https://github.com/downforacross/downforacross.com/pull/153#discussion_r563954015 Fix here: https://github.com/downforacross/downforacross.com/commit/56b99f3a923dde428fca562b7cf3d72f794b916f