Re: IOERROR: mapping /srv/imap/config/annotations.db.NEW file: Cannot allocate memory
How big is your annotations.db ? What architecture are you running on? On Sat, 17 Dec 2016, at 04:34, Jan Kowalsky via Info-cyrus wrote: > Hi all, > > for a few days all time creating or deleting folders we get an error in > mail.log: > > Dec 16 18:28:17 mail imap[10078]: IOERROR: mapping > /srv/imap/config/annotations.db.NEW file: Cannot allocate memory > Dec 16 18:28:17 mail imap[10078]: Fatal error: failed to mmap > /srv/imap/config/annotations.db.NEW file > Dec 16 18:28:17 mail imap[10078]: twoskip: > /srv/imap/config/annotations.db closed while still locked > > We can create mailboxes - but cannot delete them anymore. > > The annotations.db is twoskip format and we are running cyrus 2.5 (with > kolab). > > Any Idea? > > Thanks and best regards > Jan > > 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 -- Bron Gondwana br...@fastmail.fm 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
Re: "Resource temporarily unavailable", systemd and your FAQ Webpage
Thanks Stephan! I will fold your information into the FAQ as this is a topic which comes up semi regularly on the list. Nicola On Fri, Dec 16, 2016, at 07:54 PM, Stephan Lauffer via Info-cyrus wrote: > Hello! > > While testing 2.5 we struggled over (known) problems like this...: > > ...ssh can't fork process to run service imaps/ipv4: Resource > temporarily unavailable > > I searchd... and I found your FAQ... > > https://cyrusimap.org/imap/faqs/o-toomanyprocesses.html > > ...and this "tcp_keepalive = 1" hint was doing a good job, but not > fixing our problem completely. Less processes as without this setting > but too many at all. > > Btw we have a murder with 5 backends and each has about 5k mboxes. > With 2.4 we have about 400 imapd processes on the backends (in normal > state) and about 800 on the proxy. Peaks raises this values for sure. > > But we still wasn't able to get over a limit of about 500 imapds on > our new system which is running 2.5. Yesterday night I found our > problem: > > SYSTEMD > > (and not cyrus-imapd-2.5, but 2.5 was running with systemd here...) > > I guess there may be more people out there which may be interested in > a solition (we will add fixes to our systemd scripts of our suse bulds > soon, see > https://build.opensuse.org/package/show/home:nixda:devel/cyrus-imapd). > > The first problem there is: > > Systemd does not care about your /etc/security/limits.conf > > The second problem is: > > Systemd comes with a new limit called "TasksMax". You will find this > limit f.e. in /etc/systemd/system.conf as "DefaultTasksMax=512". But > you will NOT find this limit in "cat /proc/`cat > /var/run/cyrus.pid`/limits". > > The solution is to add a file with a systemd override for this > service. F.e. use the systemctl edit command... (like > "systemctl edit cyrus-imapd.service") or place a file in > /etc/systemd/system/cyrus-imapd.service.d/override.conf with f.e.: > > [Service] > TasksMax=2048 > LimitNOFILE=1 > > The LimitNOFILE is just a guess... maybe you may not need this here. > > After setting this override you will see a status information about > your process count and limit like this: > > # systemctl status cyrus-imapd.service > ● cyrus-imapd.service - The Cyrus IMAP and POP Mail Server > Loaded: loaded (/usr/lib/systemd/system/cyrus-imapd.service; > enabled; vendor preset: disabled) > Drop-In: /etc/systemd/system/cyrus-imapd.service.d > └─override.conf > Active: active (running) since Thu 2016-12-15 20:51:17 CET; > 12h ago > Main PID: 12901 (master) > Tasks: 326 (limit: 2048) > [...] > > > What about adding a short hint to your faq? Yes, it is not a cyrus > problem. And yes, a sysadmin should know... but... I guess systemd in > depth may not be good known as the old ulimit thing and if you are > searching in the web 99% of the hits deal with ulimit. > > > -- > Liebe Gruesse, with best regards > Stephan Lauffer > > Pedagogical University Freiburg - Germany > http://www.ph-freiburg.de/zik/ > Fon/ Fax: +49 761 682 -559/ -486 > > 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 > Email had 1 attachment: > * smime.p7s 8k (application/pkcs7-signature) 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
IOERROR: mapping /srv/imap/config/annotations.db.NEW file: Cannot allocate memory
Hi all, for a few days all time creating or deleting folders we get an error in mail.log: Dec 16 18:28:17 mail imap[10078]: IOERROR: mapping /srv/imap/config/annotations.db.NEW file: Cannot allocate memory Dec 16 18:28:17 mail imap[10078]: Fatal error: failed to mmap /srv/imap/config/annotations.db.NEW file Dec 16 18:28:17 mail imap[10078]: twoskip: /srv/imap/config/annotations.db closed while still locked We can create mailboxes - but cannot delete them anymore. The annotations.db is twoskip format and we are running cyrus 2.5 (with kolab). Any Idea? Thanks and best regards Jan 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
Re: "Resource temporarily unavailable", systemd and your FAQ Webpage
> "NB" == Nic Bernstein via Info-cyrus> writes: NB> I'm curious which Linux distribution NB> you're using? For the record, Fedora's systemd has task accounting enabled (and I've added some information to the unit file about it). I'm not sure about RHEL7 as its systemd/system.conf file doesn't mention Tasks at all. - J< 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
Re: "Resource temporarily unavailable", systemd and your FAQ Webpage
Hello Nic, Zitat von Nic Bernstein: Stephan, Thank you for this very interesting description of both the problem and the solution. I'm curious which Linux distribution you're using? We're using Ubuntu Xenial (16.04) and find the following default settings: $ grep -i tasks /etc/systemd/system.conf #DefaultTasksAccounting=no #DefaultTasksMax= so this would seem not to be an issue on Ubuntu systems, at least. Cheers, -nic On 12/16/2016 02:54 AM, Stephan Lauffer via Info-cyrus wrote: The problems here where was found on SLES-12-SP2 and a openSUSE Leap 42.2. I guess all SUSE systemd distros may have this limits (it's not a bug, it's a feature). ;-) But in general every systemd may be affected... it is just a question of the systemd setup there. RedHat left a comment in the ulimit file (see https://bugzilla.redhat.com/show_bug.cgi?id=754285). In our rhel 7.2 I can read..: # /etc/security/limits.conf # #This file sets the resource limits for the users logged in via PAM. #It does not affect resource limits of the system services. [...] Im am missing this in SuSE (will open a request there). But ok, if the sysadmin is really up to date he may already know. :-)) But like mentioned before I vote for a paraphraph 4 in the cyrus FAQ about "The process count keeps growing!" -- Liebe Gruesse, with best regards Stephan Lauffer Pedagogical University Freiburg - Germany http://www.ph-freiburg.de/zik/ Fon/ Fax: +49 761 682 -559/ -486 smime.p7s Description: S/MIME-Signatur 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
Re: "Resource temporarily unavailable", systemd and your FAQ Webpage
Stephan, Thank you for this very interesting description of both the problem and the solution. I'm curious which Linux distribution you're using? We're using Ubuntu Xenial (16.04) and find the following default settings: $ grep -i tasks /etc/systemd/system.conf #DefaultTasksAccounting=no #DefaultTasksMax= so this would seem not to be an issue on Ubuntu systems, at least. Cheers, -nic On 12/16/2016 02:54 AM, Stephan Lauffer via Info-cyrus wrote: Hello! While testing 2.5 we struggled over (known) problems like this...: ...ssh can't fork process to run service imaps/ipv4: Resource temporarily unavailable I searchd... and I found your FAQ... https://cyrusimap.org/imap/faqs/o-toomanyprocesses.html ...and this "tcp_keepalive = 1" hint was doing a good job, but not fixing our problem completely. Less processes as without this setting but too many at all. Btw we have a murder with 5 backends and each has about 5k mboxes. With 2.4 we have about 400 imapd processes on the backends (in normal state) and about 800 on the proxy. Peaks raises this values for sure. But we still wasn't able to get over a limit of about 500 imapds on our new system which is running 2.5. Yesterday night I found our problem: SYSTEMD (and not cyrus-imapd-2.5, but 2.5 was running with systemd here...) I guess there may be more people out there which may be interested in a solition (we will add fixes to our systemd scripts of our suse bulds soon, see https://build.opensuse.org/package/show/home:nixda:devel/cyrus-imapd). The first problem there is: Systemd does not care about your /etc/security/limits.conf The second problem is: Systemd comes with a new limit called "TasksMax". You will find this limit f.e. in /etc/systemd/system.conf as "DefaultTasksMax=512". But you will NOT find this limit in "cat /proc/`cat /var/run/cyrus.pid`/limits". The solution is to add a file with a systemd override for this service. F.e. use the systemctl edit command... (like "systemctl edit cyrus-imapd.service") or place a file in /etc/systemd/system/cyrus-imapd.service.d/override.conf with f.e.: [Service] TasksMax=2048 LimitNOFILE=1 The LimitNOFILE is just a guess... maybe you may not need this here. After setting this override you will see a status information about your process count and limit like this: # systemctl status cyrus-imapd.service ● cyrus-imapd.service - The Cyrus IMAP and POP Mail Server Loaded: loaded (/usr/lib/systemd/system/cyrus-imapd.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/cyrus-imapd.service.d └─override.conf Active: active (running) since Thu 2016-12-15 20:51:17 CET; 12h ago Main PID: 12901 (master) Tasks: 326 (limit: 2048) [...] What about adding a short hint to your faq? Yes, it is not a cyrus problem. And yes, a sysadmin should know... but... I guess systemd in depth may not be good known as the old ulimit thing and if you are searching in the web 99% of the hits deal with ulimit. 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 -- Nic Bernstein n...@onlight.com Onlight, Inc. www.onlight.com 6525 W Bluemound Road, Suite 24 v. 414.272.4477 Milwaukee, Wisconsin 53213-4073 <> 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
"Resource temporarily unavailable", systemd and your FAQ Webpage
Hello! While testing 2.5 we struggled over (known) problems like this...: ...ssh can't fork process to run service imaps/ipv4: Resource temporarily unavailable I searchd... and I found your FAQ... https://cyrusimap.org/imap/faqs/o-toomanyprocesses.html ...and this "tcp_keepalive = 1" hint was doing a good job, but not fixing our problem completely. Less processes as without this setting but too many at all. Btw we have a murder with 5 backends and each has about 5k mboxes. With 2.4 we have about 400 imapd processes on the backends (in normal state) and about 800 on the proxy. Peaks raises this values for sure. But we still wasn't able to get over a limit of about 500 imapds on our new system which is running 2.5. Yesterday night I found our problem: SYSTEMD (and not cyrus-imapd-2.5, but 2.5 was running with systemd here...) I guess there may be more people out there which may be interested in a solition (we will add fixes to our systemd scripts of our suse bulds soon, see https://build.opensuse.org/package/show/home:nixda:devel/cyrus-imapd). The first problem there is: Systemd does not care about your /etc/security/limits.conf The second problem is: Systemd comes with a new limit called "TasksMax". You will find this limit f.e. in /etc/systemd/system.conf as "DefaultTasksMax=512". But you will NOT find this limit in "cat /proc/`cat /var/run/cyrus.pid`/limits". The solution is to add a file with a systemd override for this service. F.e. use the systemctl edit command... (like "systemctl edit cyrus-imapd.service") or place a file in /etc/systemd/system/cyrus-imapd.service.d/override.conf with f.e.: [Service] TasksMax=2048 LimitNOFILE=1 The LimitNOFILE is just a guess... maybe you may not need this here. After setting this override you will see a status information about your process count and limit like this: # systemctl status cyrus-imapd.service ● cyrus-imapd.service - The Cyrus IMAP and POP Mail Server Loaded: loaded (/usr/lib/systemd/system/cyrus-imapd.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/cyrus-imapd.service.d └─override.conf Active: active (running) since Thu 2016-12-15 20:51:17 CET; 12h ago Main PID: 12901 (master) Tasks: 326 (limit: 2048) [...] What about adding a short hint to your faq? Yes, it is not a cyrus problem. And yes, a sysadmin should know... but... I guess systemd in depth may not be good known as the old ulimit thing and if you are searching in the web 99% of the hits deal with ulimit. -- Liebe Gruesse, with best regards Stephan Lauffer Pedagogical University Freiburg - Germany http://www.ph-freiburg.de/zik/ Fon/ Fax: +49 761 682 -559/ -486 smime.p7s Description: S/MIME-Signatur 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