Unable to login via IMAP: Connection to storage server failed: process_limit (100) reached

Created:

2016-11-16 13:19:33 UTC

Modified:

2017-08-23 09:24:40 UTC

8

Was this article helpful?


Have more questions?

Submit a request

Unable to login via IMAP: Connection to storage server failed: process_limit (100) reached

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Sometimes, hosting clients cannot log in to Roundcube or using another IMAP client on Dovecot IMAP server. Valid credentials are used. The following error appears:

CONFIG_TEXT: Roundcube Connection to storage server failed

In the ' /var/log/maillog ' the following error message can be found:

CONFIG_TEXT: dovecot: master: Warning : service(imap-login): process_limit (100) reached, client connections are being dropped
...
Warning : Sent SIGKILL to 99 imap-login
...
dovecot: service=lda, user=user@example.com, ip=[]. Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused
dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
postfix/pipe[185750]: E57D84520062: to=<user@example.com>, relay=plesk_virtual, delay=1.7, delays=0.66/0/0/1.1, dsn=4.2.1, status=deferred (Message can not be delivered at this time )

The following errors appear in /var/log/plesk-roundcube/errors log:

CONFIG_TEXT: IMAP Error: Login failed for kru@example.com from 203.0.113.4(X-Real-IP: 203.0.113.2). Empty startup greeting (localhost:143) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (GET /?_task=mail&_action=search&_filter=ALL&_interval=&_q=ik&_headers=subject%2Cfrom&_scope=base&_mbox=INBOX&_remote=1&_unlock=loading1478765408628&_=1478765335293)

The following error can be found in /var/log/plesk/modules/monit.log if Watchdog extension is installed on the server:

CONFIG_TEXT: monit: embed_ssl_socket(): Openssl syscall error: Connection reset by peer!
'dovecot' failed, cannot open a connection to INET[localhost:993]
'dovecot' stop: /usr/local/psa/admin/bin/mailmng-service
'dovecot' failed, cannot open a connection to INET[localhost:143]
'dovecot' process is not running
'dovecot' trying to restart 'dovecot' start: /usr/local/psa/admin/bin/mailmng-service

Cause

Dovecot connections limits exhausted. Bug in product with ID # PPPM-5559. Will be fixed in further updates.

Resolution

  1. Connect to the server using SSH.

  2. Create a file /etc/dovecot/conf.d/99-imap-login.conf with the following content:

    # cat /etc/dovecot/conf.d/99-imap-login.conf
    service imap-login {
    process_limit = 200
    process_min_avail = 16
    }

    Tune process_limit value according to the server load.

  3. Restart dovecot service:

    # service dovecot restart

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Faris Raouf

    May I suggest that the title be changed to "IMAP or Webmail login fails with ..."

    This suggestion is because we experienced this issue and initially did not look at this article because the subject I was looking for was IMAP as the problem we were experiencing was not directly related to roundcube. (it was too many regular IMAP connections)

    Incidentally, although I have not investigated fully, it appears as though fail2ban added the IP address of users trying to login to webmail while this issue was occurring due to the "login failed" error message. This is understandable, and I mention it only because it might be sensible for people to check their fail2ban IP block lists and remove any IPs that were added via the roundcube jail after experiencing this issue.

    Finally, it might be good to add a note to say that /var/log/Plesk/modules/monit.log will not be present on all systems (unless the appropriate module is installed).

    But when I did eventually find this article it helped me resolve the problem immediately and I'm very thankful that it was posted.

  • 0
    Avatar
    Bulat Tsydenov

    @Faris, Thank you for providing your suggestions they make sense. The article was modified accordingly.

Please sign in to leave a comment.