A rare but persistant gikopoi bug has been troubling me for years, and
today, I finally found the cause.
Gikopoi is a free chat game with streaming options. 99.9% of the time it
functions perfectly well. But once in a blue moon, people attempting to
stream video/audio results in a strange bug: others are unable to grab
the problematic stream and attempting to grab the stream results in a
silent failure. Additional open streams also become broken once this
bug is triggered. The streams are not broken from the start but become
broken within a few minutes of beginning.
- Restarting the Giko server doesn't fix it
- Restarting the Nginx web server doesn't fix it
- Restarting the Janus media server doesn't fix it
I still don't know exactly what triggers the bug. It seemed like only
certain players trigger the bug, and I couldn't find any useful data in
logs to fully understand the problem. But today, I found how to resolve
it:
In the Gikopoi server directory, a file "persisted-state" exists that
keeps a json of all users with data like their ID, name, last message,
character, etc. This is useful for cases when the server resets --
everyone active resumes playing like nothing happens.
For some reason, when streams break on gikopoi, shutting down the server
and clearing out this file makes it work again. So I'm suspecting that
streams may break if users fail to exit the game properly... or maybe
players being logged on for too long triggers the bug... I honestly don't
know. I have a saved copy of persisted-state I can compare against a new
copy of persisted-state the next time streams break.