Most IRC libraries will have some way to handle a connection disconnection.
We use DNS to point at an AWS elastic load balancer. At this point we suspect that these disconnection events are due to ELB instances changing IP addresses. When an IP address changes, clients are disconnected. This is a (unfortunately) well documented issue:
The recommendation is to handle disconnections as @3ventic mentions.
You could also periodically tear down & rebuild a connection, but that is generally unnecessary. We’re investigating more tracking of when this happens on our end, so we can understand it better.
Always appreciate data dumps (with timestamps) from you guys if you see something like this so we can correlate it with our own metrics!