File: o-toomanyprocesses.rst.txt

package info (click to toggle)
cyrus-imapd 3.10.0~beta1-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 86,332 kB
  • sloc: ansic: 284,810; perl: 135,824; javascript: 9,562; sh: 5,728; yacc: 2,565; cpp: 2,147; makefile: 2,133; lex: 662; xml: 621; awk: 303; python: 279; asm: 262
file content (30 lines) | stat: -rw-r--r-- 1,400 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
The process count keeps growing!
================================

If you notice that your imapd process count continues to grow and never decreases, there are a number of options which may be affecting it.

1. Reuse count
--------------

By default, imapd processes will remain alive for 250 new connections before shutting down. Setting this to a lower value will reduce the amount of time unused processes hang around. There is a tradeoff between startup/shutdown overhead and process longevity.

The use setting is the **- U** argument to :cyrusman:`imapd(8)`.

2. Maximum child count
----------------------

By default, Cyrus is allowed to spawn a limitless number of child imapd processes. To control this growth, adjust the **maxchild** option in :cyrusman:`cyrus.conf(5)`.

3. Clean up connections that are no longer in use
-------------------------------------------------

While POP connections are short lived, IMAP connections can be long lived. And then there are processes trying to listen to a client that's no longer alive. 

Setting **tcp_keepalive** option in :cyrusman:`imapd.conf(5)` to **1** can be used to test if connections are still alive. The operating system will send an ACK packet every so often (every 2 hours by default on Linux) which tests if the TCP endpoint is still reachable.

The other **tcp_keepalive_** options help control how and when the test occurs.