Dovecot config file looks just fine, and it allows max to 500 concurrent imap login process:
service imap-login {
process_limit = 500
service_count = 1
}
Were the IP addresses of your clients/computers blocked in iptables when the issue happen? Do you have Fail2ban service running? If so, it might be a good idea to stop and disable it for some days to see whether this issue happens again or not.