can't join room if server idle for a long time

0 votes

i'm working a html5 game project using web socket and i got problem that after leaving my server idle for a long time ( 2-3 hours), i can't join room anymore and have to restart server. at the time i can't join the room, i saw this server message on log file "sending websocket handshake response...."

Can anyone explain and advise?
asked Dec 2, 2015 in AppWarpS2 by nguyenanhdung (51 points)

1 Answer

0 votes
Best answer
Hello Dung,

We are looking into this and will get back to you as soon as possible.

Also, is it coming on any specific browser or on all browsers?

answered Dec 3, 2015 by rajeev.etc (1,660 points)
selected Dec 7, 2015 by nguyenanhdung
it's coming on any browser. and whenever i saw this server log "sending websocket handshake response...." then i can't join the room any more.
The Error/result code from server is 2 (RESOURCE_NOT_FOUND = 2)
Btw, these rooms is dynamic rooms created by izone.createRoom(...). Look like there is an expired time for such these rooms?
Yes, if the dynamic rooms are empty for more than 1 hour, then it will be deleted by the server by default. Please check and let me know if this is not the case.
anyway to change this setting, like configure the room will not be deleted even if empty?
Yes, you can modify the default value of ghost room deletion time. You just need to add following key in the AppConfig.json file:
     "CleanUpTime": 600000
Make sure the above cleanup time is in milliseconds.
Let me know if you face any problem.
thanks. so i have to define the alive time for empty room. no way make make it alive forever, rite?
Yes, you have to define the life of an empty room, so that it can be deleted after a period of time if it is not going to be used.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on