Some possible solutions:
About once every five minutes, the server will send you a “PING :tmi.twitch.tv”. To ensure that your connection to the server is not prematurely terminated, reply with “PONG :tmi.twitch.tv”.
Twitch also limits the amount of data sent to and from a single address.
For more info for command & message limitations https://dev.twitch.tv/docs/irc#irc-command-and-message-limits