Mass disconnection

I’ve reviewed my log file after a recent outage and I noticed that my bot disconnected from 165 of the connections that it holds to the Twitch chat servers. I believe that the root of the problem is that I am not handling the RECONNECT command correctly and that I am trying to reconnect these connections too quickly.

I have a few questions that will help me to resolve this.

The first question: what is the exact format of a RECONNECT message? I notice in the IRC documentation that messages such as ROOMSTATE, USERSTATE, etc. have examples, but there is no example for RECONNECT. My logs do not show any RECONNECT messages, possibly because my parser crashes when parsing RECONNECT messages. I will correct the parser to log messages that it cannot parse, but if someone can enlighten me to the format of a RECONNECT message, then it will save me a deployment.

The second question: are RECONNECT messages jitterred so that I do not receive them all at once? If not, then I will have to build in my own jittering so that I do not reconnect all at once.

RECONNECT is just a command so the message shouldn’t be any different from other messages.

Should be RECONNECT, but I haven’t actually ever seen it mostly due to handling it via PING/PONG myself.

Is your bot verified, or added as a known bot? If you have 165 connections we probably should be chatting about that so you’re not breaking rate limits.

Hi xangold

I have requested for the bot to be added to the list of verified bots. I’m happy to chat - what would be the best way?

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