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:
com.openexchange.imap.maxNumExternalConnections

Notation is a comma-separated list of: <host> + ':' + <max-count>; e.g.:
com.openexchange.imap.maxNumExternalConnections=im ap.host1.com:4, imap.host2.com:6??
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.