On 2/27/19 7:00 PM, Aki Tuomi via dovecot wrote:
On 27 February 2019 18:49 Asai via dovecot dovecot@dovecot.org wrote:
Greetings,
We have a PHP based shell script that runs a doveadm backup routine.
[...] the shell script would run for a few minutes and then hang, as it added more log messages to the dsync STDOUT.
You might want to enable mail_log plugin for imap/pop3 protocols only.
I would also log what the backup script is doing and go from there ?
If PHP supports signal handling, you could also try to see if there's traceback library for PHP and attach the traceback functions to a system signal like SIGUSR1 in your backup script. You can send that signal from the command line (with kill) whenever you script hangs. This would give you the exact stack of function calls that lead to the hangup.
If you want, you can check this archived page (https://archive.li/bi3rZ) (skip to Where was the program hanging ?). Although it's written for a python program, you can apply the same principles for PHP.
Yassine.