Caused by GMail error that too many connections were opened.
Therefore introduced a configuration option to restrict number of concurrent connections to subscribed/external IMAP accounts:

Notation is a comma-separated list of: <host> + ':' + <max-count>; e.g.:
For convenience a max-count can be specified which applies to all subscribed/external IMAP accounts; e.g.:
com.openexchange.imap.maxNumExternalConnections=4? ?
Zero or less is interpreted as unlimited.
By default unlimited concurrent connections are allowed.