Twitch chat servers stop sending data about 4 times per day

Hey guys, I run a chat bot for a pretty big stream (1000-2000 viewers). I have been tracking disconnects for quite a while and I notice that the twitch chat server will stop sending chat messages randomly throughout the day. I currently have a part in my code that will see that no data is being received and will reconnect. I look at my logs and notice that about 4 times per day the bot has to initiate a reconnect to the chat servers. There seems to be no correlation to when the server stops sending data, the streamer may be streaming or not, it doesn’t matter. The volume of messages whether high or low does not determine when the session with the twitch chat server dies. I currently reply to all PONG messages, and I log every single packet to try to determine the solution. The only thing I can see on my logs is that chat messages come in, then stop, the TCP connection to the server stays alive but no more data comes.

Here’s a log of when the bot has to reconnect when it detects this state:

09/25/2016 05:52:27 AM server stopped sending data
09/25/2016 04:21:46 AM server stopped sending data
09/24/2016 05:43:16 PM server stopped sending data
09/24/2016 07:17:11 AM server stopped sending data
09/24/2016 05:11:21 AM server stopped sending data
09/24/2016 03:30:35 AM server stopped sending data
09/23/2016 08:28:45 PM server stopped sending data
09/23/2016 05:37:34 PM server stopped sending data
09/23/2016 05:20:23 AM server stopped sending data
09/23/2016 04:39:49 AM server stopped sending data
09/23/2016 03:59:15 AM server stopped sending data
09/23/2016 00:53:11 AM server stopped sending data
09/22/2016 05:01:01 AM server stopped sending data
09/22/2016 04:15:28 AM server stopped sending data
09/21/2016 09:56:01 AM server stopped sending data
09/21/2016 08:25:12 AM server stopped sending data
09/21/2016 05:24:04 AM server stopped sending data
09/21/2016 04:08:22 AM server stopped sending data
09/20/2016 08:38:38 AM server stopped sending data
09/20/2016 07:58:05 AM server stopped sending data
09/20/2016 07:17:27 AM server stopped sending data
09/20/2016 05:50:38 AM server stopped sending data
09/20/2016 03:54:45 AM server stopped sending data
09/20/2016 00:43:22 AM server stopped sending data
09/19/2016 07:09:15 AM server stopped sending data
09/19/2016 04:33:22 AM server stopped sending data
09/18/2016 07:38:06 AM server stopped sending data

There seems to be no correlation between when there is activity in chat or not… Any ideas?

The edge servers sometimes restart and, due to the nature of cloud services, the number of them is variable based on server load throughout the day. What you’re noticing is likely just a normal consequence.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.