Re: Multi-thread cyrus delayed forking of imapd processes after connecting to master listener

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 24.05.17 um 06:00 schrieb Michael Hieb:
[...]


MAILSERVER:~ # strace -p 2120
Process 2120 attached
fcntl(13, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}

Process hangs, nothing happening... then about 45 seconds later (in this case - time to wait varies each time I try this) it frees itself and strace shows this:

MAILSERVER:~ # strace -p 2120
Process 2120 attached
fcntl(13, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
stat("/usr/lib/cyrus/bin/imapd", {st_mode=S_IFREG|0755, st_size=1758976, ...}) = 0
accept(4, 0, NULL)                      = 14
fcntl(13, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0

It tries to acquire a write lock on a file and finally gets it when another process releases it. Seems to be the lock file itself.

With your configuration all different imapd processes use the same lock file because of their name "imap". Lock files are located in /var/lib/imap/socket, search for imap-0.lock and imap-1.lock.

As others already suggested:
- use a unique name for each line/process in the SERVICES section
- use only alphanumeric characters [a-z0-9]

This should work:

imap1 cmd="imapd -C /etc/imapd.domain1.com.conf " listen="192.168.171.4:imap" maxchild=-1 maxforkrate=100 imap2 cmd="imapd -C /etc/imapd.domain1.com.conf " listen="192.168.110.171:imap" maxchild=-1 maxforkrate=100
...

This doesn't work because of the dots:
imap.domain1.com.external cmd="imapd -C /etc/imapd.domain1.com.conf " listen="192.168.171.4:imap" maxchild=-1 maxforkrate=100 imap.domain1.com.internal cmd="imapd -C /etc/imapd.domain1.com.conf " listen="192.168.110.171:imap" maxchild=-1 maxforkrate=100
...

Check lock file names in /var/lib/imap/socket. You should see <name>-0.lock and/or <name>-1.lock files for every name.

Edda

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux