Kerio Connect 9.2.6 introduced a limit for a number of simultaneous connections from a single IP address, which is — by default — set to 100 per protocol. If more than a hundred of users start using Kerio Connect from the same place, the server would quickly run out the limit. When it happens, it would (seemingly) randomly block user connections and the users would see a connection error window (or “Bad Gateway” if you use a reverse proxy, e.g. nginx).
To fix the problem, open mailserver.cfg, find a configuration block for the protocol for which the limit was exhausted (for example, service-https) and set MaxConnectionsIP to a higher value of your liking. It is necessary to stop Kerio Connect before editing mailserver.cfg.