Gentoo Archives: gentoo-user

From: Michael Hampicke <gentoo-user@××××.biz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Apache forked itself to death...
Date: Sun, 16 Sep 2012 13:28:42
Message-Id: 5055D386.3070706@hadt.biz
In Reply to: [gentoo-user] Apache forked itself to death... by Jarry
1 Am 16.09.2012 08:55, schrieb Jarry:
2 > Hi,
3 > strange thing happened to my web-server (apache-2.2.22-r1):
4 > it started forking untill it used all ram/swap and stopped
5 > responding. I counted ~60 apache processes running (ps -a),
6 > all sleeping, top showed no load except all memory being used.
7 > Log-files showed nothing suspicious to me, except for a few
8 > "GET / HTTP/1.1 200 40" messages at the time when apache
9 > was already unable to send reply.
10 >
11 > Apparently my apache is not correctly configured when it
12 > "forked to death", but maybe someone can help me. I have
13 > about 1GB memory for apache. What should I change in my
14 > config so that apache never runs out of memory?
15 >
16 > server-info:
17 > Timeouts: connection: 60 keep-alive: 15
18 > MPM Name: Prefork
19 > MPM Information: Max Daemons: 150 Threaded: no Forked: yes
20 > Module Name: prefork.c
21 > 31: StartServers 5
22 > 32: MinSpareServers 5
23 > 33: MaxSpareServers 10
24 > 34: MaxClients 150
25 >
26 > Jarry
27 >
28
29
30 Hi,
31
32 try reducing MaxClients to 64, StartServers and MinSpareServers to 2 and
33 then observe how things develop. If you then feel apache is to slow to
34 respond to request under load, try increasing MinSpareServer one at a
35 time. But always keep in mind: every fork of apache eats your memory.

Replies

Subject Author
Re: [gentoo-user] Apache forked itself to death... Michael Mol <mikemol@×××××.com>