Hi, I am sure this is a simple question but I just can’t
seem to find any documentation that can tell me exactly what is wrong. The
current box I am running my apache 1.3.28 / Mod_perl server is a quad zeon 500
with 3GB of Ram, the server in general doesn’t get all that many hits,
around 300,000 a day. Lately I have been seeing “server reached
MaxClients setting, consider raising the MaxClients
setting” about 6 seconds after I start up apache. Then I added #memory info <Location /perl-status> PerlModule Apache::Status PerlModule B::TerseSize SetHandler perl-script PerlHandler Apache::Status PerlSetVar StatusTerse On PerlSetVar StatusTerseSize On PerlSetVar StatusTerseSizeMainSummary
On PerlSetVar StatusDumper On PerlSetVar StatusPeek On </Location> and found the
average site to be 37MB so I added PerlFixupHandler Apache::SizeLimit $Apache::SizeLimit::MAX_UNSHARED_SIZE
= 50000; $Apache::SizeLimit::CHECK_EVERY_N_REQUESTS
= 10; Which I thought should cap it at 50MB so 3000 / 50 = 60 so I
set MinSpareServers 5 MaxSpareServers 10 StartServers 20 MaxClients 60 MaxRequestsPerChild 5000 Which in my mind should basically use up all 3GB of memory
before I see the “server reached MaxClients
setting, consider raising the MaxClients setting”
but when the MaxClients error appears the memory is
hardly being used at all Cat /proc/meminfo MemTotal: 3116164 kB MemFree: 1929260 kB Buffers:
40656 kB Cached:
127360 kB SwapCached: 11028 kB Active:
1094232 kB Inactive:
49228 kB HighTotal: 2228208 kB HighFree: 1133632 kB LowTotal: 887956 kB LowFree:
795628 kB SwapTotal: 1048536 kB SwapFree: 1031008 kB Dirty:
340 kB Writeback:
0 kB Mapped:
974096 kB Slab:
29068 kB Committed_AS: 1390760 kB PageTables: 3156 kB VmallocTotal: 114680 kB VmallocUsed: 648 kB VmallocChunk: 114032 kB HugePages_Total: 0 HugePages_Free: 0 Hugepagesize: 4096 kB Free –lm –s 3
total used free shared buffers cached Mem:
3043 1126 1916
0
39 124 Low:
867
90
777
0
0
0 High:
2175 1036 1139
0
0
0 -/+ buffers/cache: 961 2081 Swap:
1023
17
1006 Which I can’t understand….. Why is there free
memory if the max clients has already been reached? Shouldn’t there be
3GB used or cached before it wants more? Consequently the server is very up and
down…… If anyone could explain this to me I would greatly
appreciate it. Thanks Shawn |
- Memory Question shawn
- Re: Memory Question Stas Bekman