• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Issue dovecot Error "Timeout waiting for handshake response"

enduser

Basic Pleskian
Server operating system version
AlmaLinux 9.5
Plesk version and microupdate number
18.0.68 Update #2
Hi all,

We have been running our Plesk server for a long time without issues, hosting many users. However, sometimes when there are numerous IMAP connections, including from webmail, the performance slows down significantly and ultimately results in an "internal server error." Below are the errors encountered when this issue arises.

Code:
Apr 24 10:52:13 server-a dovecot[65476]: imap(87285): Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:13 server-a dovecot[65476]: imap(87284): Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:13 server-a dovecot[65476]: imap(87287): Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:14 server-a dovecot[65476]: imap-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:17 server-a dovecot[65476]: pop3: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:17 server-a dovecot[65476]: imap: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:18 server-a dovecot[65476]: pop3-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:19 server-a dovecot[65476]: imap-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:22 server-a dovecot[65476]: pop3: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:22 server-a dovecot[65476]: imap: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:23 server-a dovecot[65476]: pop3-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:24 server-a dovecot[65476]: imap-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:27 server-a dovecot[65476]: pop3: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:27 server-a dovecot[65476]: imap: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:28 server-a dovecot[65476]: pop3-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:29 server-a dovecot[65476]: imap-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:32 server-a dovecot[65476]: pop3: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:32 server-a dovecot[65476]: imap: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:33 server-a dovecot[65476]: pop3-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:34 server-a dovecot[65476]: imap-login: Error: conn unix:stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:35 server-a postfix-local[87520]: 6F414D2ABD0: process '/usr/libexec/dovecot/dovecot-lda -d "$DELIVERED_TO" -a "${ORIGINAL_RECIPIENT:-$DELIVERED_TO}"' stderr : lda([email protected]): Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:36 server-a postfix-local[87536]: BDA59D2A9B9: process '/usr/libexec/dovecot/dovecot-lda -d "$DELIVERED_TO" -a "${ORIGINAL_RECIPIENT:-$DELIVERED_TO}"' stderr : lda([email protected]): Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:38 server-a dovecot[65476]: pop3: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response
Apr 24 10:52:38 server-a dovecot[65476]: imap: Error: conn unix:/var/run/dovecot/stats-writer (pid=65473,uid=0): Timeout waiting for handshake response

After we restart the server, it will be fine for short time, but soon it will repeat the problem again.

Any clues and solutions? Many thanks
 
Thank you Sebahat.hadzhi.

I have checked all the /var/qmail/mailnames/*/*/Maildir/dovecot.index.cache files, and the largest one is 63 MB. Based on this, I suspect that the default_vsz_limit doesn't help. Am I correct?

For "journalctl -xu dovecot", the output are all about users' login records, the most valued records are in my first post.

For "systemctl status dovecot", attached
 

Attachments

  • systemctl status dovecot.zip
    3.4 KB · Views: 2
Thank you. I don't think the file size is directly related to memory used and the default_vsz_limit. Anyhow, if that's the issue a more specific error/warning would most likely have been logged. At this point, I don't see anything in the logs that would hint what exactly the issue is.

How's the memory consumption of the server when the issue occurs? If you haven't noticed any issue with insufficient memory. I would suggest to try increasing the default_client_limit parameter to test if there's any positive impact:

 
Back
Top