Apache keepalive timeoutApache and memory usageApache crashes a few seconds after the startMonit is restarting apache2, should I fix the monit config, or the server config?how to know which domain is using which apache instanceApache KeepAlive and KeepAliveTimeoutApache Timeout/KeepAliveOptimizing apache server loadApache KeepAlive in child location not workingAmazon EC2 Server running very slowApache 2.2 eventually using all memory (worker mpm)
Multi tool use
Do atomic orbitals "pulse" in time?
Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?
Smallest Guaranteed hash collision cycle length
Understanding integration over Orthogonal Group
Why not just directly invest in the holdings of an ETF?
What is Plautus’s pun about frustum and frustrum?
Why was the Ancient One so hesitant to teach Dr. Strange the art of sorcery?
Word for being out at night during curfew
How can dragons propel their breath attacks to a long distance
Why doesn't Rocket Lab use a solid stage?
Is there a spell to protect inanimate objects?
Why in a Ethernet LAN, a packet sniffer can obtain all packets sent over the LAN?
Was this a power play by Daenerys?
Run script for 10 times until meets the condition, but break the loop if it meets the condition during iteration
Create a list of all possible Boolean configurations of three constraints
"Right on the tip of my tongue" meaning?
Early arrival in Australia, early hotel check in not available
Usefulness of complex chord names?
Was this character’s old age look CGI or make-up?
What does "Ich wusste, dass aus dir mal was wird" mean?
Why is this int array not passed as an object vararg array?
Why was castling bad for white in this game, and engine strongly prefered trading queens?
Meaning of「〜てみたいと思います」
Find the cipher used
Apache keepalive timeout
Apache and memory usageApache crashes a few seconds after the startMonit is restarting apache2, should I fix the monit config, or the server config?how to know which domain is using which apache instanceApache KeepAlive and KeepAliveTimeoutApache Timeout/KeepAliveOptimizing apache server loadApache KeepAlive in child location not workingAmazon EC2 Server running very slowApache 2.2 eventually using all memory (worker mpm)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a server with 2 cores and 2GB RAM which is struggling with memory utilisation.
When I run free -m I regularly get under 50MB free - right now it shows 378MB free with only 1 user actually on the site:
total used free shared buffers cached
Mem: 1869 1772 96 5 34 247
-/+ buffers/cache: 1491 378
Swap: 1023 34 989
When I run ps-aux I see lots of httpd requests which started yesterday and are still open.
apache 5789 0.0 3.8 1038176 72904 ? S 03:18 0:27 /usr/sbin/httpd
apache 5790 0.0 3.3 1029400 64216 ? S 03:18 0:26 /usr/sbin/httpd
apache 5792 0.1 3.4 1031124 65876 ? S 03:18 0:35 /usr/sbin/httpd
apache 28042 0.1 3.3 1029648 64868 ? S 04:53 0:28 /usr/sbin/httpd
apache 28043 0.0 3.8 1038412 73420 ? S 04:53 0:23 /usr/sbin/httpd
apache 31728 0.1 3.8 1038516 73008 ? S 07:53 0:14 /usr/sbin/httpd
root 31912 0.0 0.7 968160 14860 ? Ss 2014 0:03 /usr/sbin/httpd
apache 31914 0.0 0.0 246808 1364 ? S 2014 0:01 /usr/sbin/httpd
apache 31915 0.1 3.7 1038644 71700 ? S 2014 1:02 /usr/sbin/httpd
apache 31916 0.1 3.7 1038480 71844 ? S 2014 0:56 /usr/sbin/httpd
apache 31917 0.0 3.1 1026120 60044 ? S 2014 0:52 /usr/sbin/httpd
apache 31920 0.1 4.1 1045972 79940 ? S 2014 0:59 /usr/sbin/httpd
apache 31921 0.0 3.8 1039180 73040 ? S 2014 0:50 /usr/sbin/httpd
apache 31923 0.1 3.3 1029684 63908 ? S 2014 0:59 /usr/sbin/httpd
apache 31924 0.1 3.2 1027808 61632 ? S 2014 0:53 /usr/sbin/httpd
apache 31927 0.1 3.2 1027844 61664 ? S 2014 0:54 /usr/sbin/httpd
apache 31929 0.1 3.8 1039660 73528 ? S 2014 0:59 /usr/sbin/httpd
apache 31931 0.1 3.2 1028592 62492 ? S 2014 0:58 /usr/sbin/httpd
apache 31933 0.0 3.2 1029036 62876 ? S 2014 0:52 /usr/sbin/httpd
apache 31934 0.1 3.3 1029568 63232 ? S 2014 0:54 /usr/sbin/httpd
apache 32022 0.0 3.8 1038928 73104 ? S 2014 0:41 /usr/sbin/httpd
Output of top sorted by memory usage is:
31920 apache 20 0 1021m 78m 9064 S 0.0 4.2 0:59.48 httpd
31929 apache 20 0 1015m 71m 8428 S 0.0 3.8 1:02.44 httpd
28043 apache 20 0 1014m 71m 9176 S 0.0 3.8 0:26.59 httpd
32022 apache 20 0 1014m 71m 8796 S 0.0 3.8 0:44.04 httpd
31921 apache 20 0 1014m 71m 8408 S 0.0 3.8 0:51.95 httpd
31728 apache 20 0 1014m 71m 8768 S 0.0 3.8 0:15.00 httpd
5789 apache 20 0 1013m 71m 8716 S 0.0 3.8 0:28.57 httpd
591 apache 20 0 1013m 71m 8756 S 0.0 3.8 0:42.92 httpd
31916 apache 20 0 1014m 70m 8368 S 0.0 3.8 0:59.94 httpd
31915 apache 20 0 1014m 70m 8384 S 0.0 3.7 1:04.74 httpd
5792 apache 20 0 1006m 64m 8744 S 0.0 3.4 0:37.37 httpd
5790 apache 20 0 1006m 63m 8800 S 0.0 3.4 0:28.23 httpd
28042 apache 20 0 1005m 63m 9176 S 0.0 3.4 0:29.50 httpd
584 apache 20 0 1006m 62m 8456 S 0.0 3.4 0:37.14 httpd
586 apache 20 0 1006m 62m 8412 S 0.0 3.4 0:44.48 httpd
588 apache 20 0 1006m 62m 8424 S 0.0 3.4 0:43.11 httpd
587 apache 20 0 1006m 62m 8420 S 0.0 3.4 0:47.20 httpd
31923 apache 20 0 1005m 62m 8796 S 0.0 3.3 1:01.21 httpd
31933 apache 20 0 1005m 62m 8376 S 0.0 3.3 0:54.89 httpd
31927 apache 20 0 1004m 60m 8392 S 0.0 3.2 0:58.68 httpd
31924 apache 20 0 1003m 60m 8412 S 0.0 3.2 0:53.68 httpd
31934 apache 20 0 1003m 60m 8408 S 0.0 3.2 0:56.56 httpd
31917 apache 20 0 1003m 60m 8404 S 0.0 3.2 0:54.97 httpd
1871 root 20 0 157m 17m 1968 S 0.0 0.9 0:53.10 lfd
5597 apache 20 0 952m 16m 5212 S 0.0 0.9 0:01.02 httpd
31912 root 20 0 945m 14m 13m S 0.0 0.8 0:03.37 httpd
5854 root 20 0 98364 4676 3672 S 0.0 0.2 0:00.09 sshd
6557 postfix 20 0 82264 4420 3292 S 0.0 0.2 0:00.04 cleanup
6560 postfix 20 0 82168 4316 3324 S 0.0 0.2 0:00.03 smtp
4411 postfix 20 0 81964 4048 3096 S 0.0 0.2 0:00.04 pickup
5856 root 20 0 105m 1944 1528 S 0.0 0.1 0:00.02 bash
In my httpd.conf I have:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
<IfModule prefork.c>
StartServers 4
MinSpareServers 12
MaxSpareServers 24
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 3000
</IfModule>
From the above I assume this means that KeepAlive is on but that it will only keep any session alive for 2 seconds - if that is correct, why do I still have lots of processes running from yesterday and how can I remediate against this?
apache-2.2 httpd.conf
add a comment |
I have a server with 2 cores and 2GB RAM which is struggling with memory utilisation.
When I run free -m I regularly get under 50MB free - right now it shows 378MB free with only 1 user actually on the site:
total used free shared buffers cached
Mem: 1869 1772 96 5 34 247
-/+ buffers/cache: 1491 378
Swap: 1023 34 989
When I run ps-aux I see lots of httpd requests which started yesterday and are still open.
apache 5789 0.0 3.8 1038176 72904 ? S 03:18 0:27 /usr/sbin/httpd
apache 5790 0.0 3.3 1029400 64216 ? S 03:18 0:26 /usr/sbin/httpd
apache 5792 0.1 3.4 1031124 65876 ? S 03:18 0:35 /usr/sbin/httpd
apache 28042 0.1 3.3 1029648 64868 ? S 04:53 0:28 /usr/sbin/httpd
apache 28043 0.0 3.8 1038412 73420 ? S 04:53 0:23 /usr/sbin/httpd
apache 31728 0.1 3.8 1038516 73008 ? S 07:53 0:14 /usr/sbin/httpd
root 31912 0.0 0.7 968160 14860 ? Ss 2014 0:03 /usr/sbin/httpd
apache 31914 0.0 0.0 246808 1364 ? S 2014 0:01 /usr/sbin/httpd
apache 31915 0.1 3.7 1038644 71700 ? S 2014 1:02 /usr/sbin/httpd
apache 31916 0.1 3.7 1038480 71844 ? S 2014 0:56 /usr/sbin/httpd
apache 31917 0.0 3.1 1026120 60044 ? S 2014 0:52 /usr/sbin/httpd
apache 31920 0.1 4.1 1045972 79940 ? S 2014 0:59 /usr/sbin/httpd
apache 31921 0.0 3.8 1039180 73040 ? S 2014 0:50 /usr/sbin/httpd
apache 31923 0.1 3.3 1029684 63908 ? S 2014 0:59 /usr/sbin/httpd
apache 31924 0.1 3.2 1027808 61632 ? S 2014 0:53 /usr/sbin/httpd
apache 31927 0.1 3.2 1027844 61664 ? S 2014 0:54 /usr/sbin/httpd
apache 31929 0.1 3.8 1039660 73528 ? S 2014 0:59 /usr/sbin/httpd
apache 31931 0.1 3.2 1028592 62492 ? S 2014 0:58 /usr/sbin/httpd
apache 31933 0.0 3.2 1029036 62876 ? S 2014 0:52 /usr/sbin/httpd
apache 31934 0.1 3.3 1029568 63232 ? S 2014 0:54 /usr/sbin/httpd
apache 32022 0.0 3.8 1038928 73104 ? S 2014 0:41 /usr/sbin/httpd
Output of top sorted by memory usage is:
31920 apache 20 0 1021m 78m 9064 S 0.0 4.2 0:59.48 httpd
31929 apache 20 0 1015m 71m 8428 S 0.0 3.8 1:02.44 httpd
28043 apache 20 0 1014m 71m 9176 S 0.0 3.8 0:26.59 httpd
32022 apache 20 0 1014m 71m 8796 S 0.0 3.8 0:44.04 httpd
31921 apache 20 0 1014m 71m 8408 S 0.0 3.8 0:51.95 httpd
31728 apache 20 0 1014m 71m 8768 S 0.0 3.8 0:15.00 httpd
5789 apache 20 0 1013m 71m 8716 S 0.0 3.8 0:28.57 httpd
591 apache 20 0 1013m 71m 8756 S 0.0 3.8 0:42.92 httpd
31916 apache 20 0 1014m 70m 8368 S 0.0 3.8 0:59.94 httpd
31915 apache 20 0 1014m 70m 8384 S 0.0 3.7 1:04.74 httpd
5792 apache 20 0 1006m 64m 8744 S 0.0 3.4 0:37.37 httpd
5790 apache 20 0 1006m 63m 8800 S 0.0 3.4 0:28.23 httpd
28042 apache 20 0 1005m 63m 9176 S 0.0 3.4 0:29.50 httpd
584 apache 20 0 1006m 62m 8456 S 0.0 3.4 0:37.14 httpd
586 apache 20 0 1006m 62m 8412 S 0.0 3.4 0:44.48 httpd
588 apache 20 0 1006m 62m 8424 S 0.0 3.4 0:43.11 httpd
587 apache 20 0 1006m 62m 8420 S 0.0 3.4 0:47.20 httpd
31923 apache 20 0 1005m 62m 8796 S 0.0 3.3 1:01.21 httpd
31933 apache 20 0 1005m 62m 8376 S 0.0 3.3 0:54.89 httpd
31927 apache 20 0 1004m 60m 8392 S 0.0 3.2 0:58.68 httpd
31924 apache 20 0 1003m 60m 8412 S 0.0 3.2 0:53.68 httpd
31934 apache 20 0 1003m 60m 8408 S 0.0 3.2 0:56.56 httpd
31917 apache 20 0 1003m 60m 8404 S 0.0 3.2 0:54.97 httpd
1871 root 20 0 157m 17m 1968 S 0.0 0.9 0:53.10 lfd
5597 apache 20 0 952m 16m 5212 S 0.0 0.9 0:01.02 httpd
31912 root 20 0 945m 14m 13m S 0.0 0.8 0:03.37 httpd
5854 root 20 0 98364 4676 3672 S 0.0 0.2 0:00.09 sshd
6557 postfix 20 0 82264 4420 3292 S 0.0 0.2 0:00.04 cleanup
6560 postfix 20 0 82168 4316 3324 S 0.0 0.2 0:00.03 smtp
4411 postfix 20 0 81964 4048 3096 S 0.0 0.2 0:00.04 pickup
5856 root 20 0 105m 1944 1528 S 0.0 0.1 0:00.02 bash
In my httpd.conf I have:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
<IfModule prefork.c>
StartServers 4
MinSpareServers 12
MaxSpareServers 24
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 3000
</IfModule>
From the above I assume this means that KeepAlive is on but that it will only keep any session alive for 2 seconds - if that is correct, why do I still have lots of processes running from yesterday and how can I remediate against this?
apache-2.2 httpd.conf
add a comment |
I have a server with 2 cores and 2GB RAM which is struggling with memory utilisation.
When I run free -m I regularly get under 50MB free - right now it shows 378MB free with only 1 user actually on the site:
total used free shared buffers cached
Mem: 1869 1772 96 5 34 247
-/+ buffers/cache: 1491 378
Swap: 1023 34 989
When I run ps-aux I see lots of httpd requests which started yesterday and are still open.
apache 5789 0.0 3.8 1038176 72904 ? S 03:18 0:27 /usr/sbin/httpd
apache 5790 0.0 3.3 1029400 64216 ? S 03:18 0:26 /usr/sbin/httpd
apache 5792 0.1 3.4 1031124 65876 ? S 03:18 0:35 /usr/sbin/httpd
apache 28042 0.1 3.3 1029648 64868 ? S 04:53 0:28 /usr/sbin/httpd
apache 28043 0.0 3.8 1038412 73420 ? S 04:53 0:23 /usr/sbin/httpd
apache 31728 0.1 3.8 1038516 73008 ? S 07:53 0:14 /usr/sbin/httpd
root 31912 0.0 0.7 968160 14860 ? Ss 2014 0:03 /usr/sbin/httpd
apache 31914 0.0 0.0 246808 1364 ? S 2014 0:01 /usr/sbin/httpd
apache 31915 0.1 3.7 1038644 71700 ? S 2014 1:02 /usr/sbin/httpd
apache 31916 0.1 3.7 1038480 71844 ? S 2014 0:56 /usr/sbin/httpd
apache 31917 0.0 3.1 1026120 60044 ? S 2014 0:52 /usr/sbin/httpd
apache 31920 0.1 4.1 1045972 79940 ? S 2014 0:59 /usr/sbin/httpd
apache 31921 0.0 3.8 1039180 73040 ? S 2014 0:50 /usr/sbin/httpd
apache 31923 0.1 3.3 1029684 63908 ? S 2014 0:59 /usr/sbin/httpd
apache 31924 0.1 3.2 1027808 61632 ? S 2014 0:53 /usr/sbin/httpd
apache 31927 0.1 3.2 1027844 61664 ? S 2014 0:54 /usr/sbin/httpd
apache 31929 0.1 3.8 1039660 73528 ? S 2014 0:59 /usr/sbin/httpd
apache 31931 0.1 3.2 1028592 62492 ? S 2014 0:58 /usr/sbin/httpd
apache 31933 0.0 3.2 1029036 62876 ? S 2014 0:52 /usr/sbin/httpd
apache 31934 0.1 3.3 1029568 63232 ? S 2014 0:54 /usr/sbin/httpd
apache 32022 0.0 3.8 1038928 73104 ? S 2014 0:41 /usr/sbin/httpd
Output of top sorted by memory usage is:
31920 apache 20 0 1021m 78m 9064 S 0.0 4.2 0:59.48 httpd
31929 apache 20 0 1015m 71m 8428 S 0.0 3.8 1:02.44 httpd
28043 apache 20 0 1014m 71m 9176 S 0.0 3.8 0:26.59 httpd
32022 apache 20 0 1014m 71m 8796 S 0.0 3.8 0:44.04 httpd
31921 apache 20 0 1014m 71m 8408 S 0.0 3.8 0:51.95 httpd
31728 apache 20 0 1014m 71m 8768 S 0.0 3.8 0:15.00 httpd
5789 apache 20 0 1013m 71m 8716 S 0.0 3.8 0:28.57 httpd
591 apache 20 0 1013m 71m 8756 S 0.0 3.8 0:42.92 httpd
31916 apache 20 0 1014m 70m 8368 S 0.0 3.8 0:59.94 httpd
31915 apache 20 0 1014m 70m 8384 S 0.0 3.7 1:04.74 httpd
5792 apache 20 0 1006m 64m 8744 S 0.0 3.4 0:37.37 httpd
5790 apache 20 0 1006m 63m 8800 S 0.0 3.4 0:28.23 httpd
28042 apache 20 0 1005m 63m 9176 S 0.0 3.4 0:29.50 httpd
584 apache 20 0 1006m 62m 8456 S 0.0 3.4 0:37.14 httpd
586 apache 20 0 1006m 62m 8412 S 0.0 3.4 0:44.48 httpd
588 apache 20 0 1006m 62m 8424 S 0.0 3.4 0:43.11 httpd
587 apache 20 0 1006m 62m 8420 S 0.0 3.4 0:47.20 httpd
31923 apache 20 0 1005m 62m 8796 S 0.0 3.3 1:01.21 httpd
31933 apache 20 0 1005m 62m 8376 S 0.0 3.3 0:54.89 httpd
31927 apache 20 0 1004m 60m 8392 S 0.0 3.2 0:58.68 httpd
31924 apache 20 0 1003m 60m 8412 S 0.0 3.2 0:53.68 httpd
31934 apache 20 0 1003m 60m 8408 S 0.0 3.2 0:56.56 httpd
31917 apache 20 0 1003m 60m 8404 S 0.0 3.2 0:54.97 httpd
1871 root 20 0 157m 17m 1968 S 0.0 0.9 0:53.10 lfd
5597 apache 20 0 952m 16m 5212 S 0.0 0.9 0:01.02 httpd
31912 root 20 0 945m 14m 13m S 0.0 0.8 0:03.37 httpd
5854 root 20 0 98364 4676 3672 S 0.0 0.2 0:00.09 sshd
6557 postfix 20 0 82264 4420 3292 S 0.0 0.2 0:00.04 cleanup
6560 postfix 20 0 82168 4316 3324 S 0.0 0.2 0:00.03 smtp
4411 postfix 20 0 81964 4048 3096 S 0.0 0.2 0:00.04 pickup
5856 root 20 0 105m 1944 1528 S 0.0 0.1 0:00.02 bash
In my httpd.conf I have:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
<IfModule prefork.c>
StartServers 4
MinSpareServers 12
MaxSpareServers 24
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 3000
</IfModule>
From the above I assume this means that KeepAlive is on but that it will only keep any session alive for 2 seconds - if that is correct, why do I still have lots of processes running from yesterday and how can I remediate against this?
apache-2.2 httpd.conf
I have a server with 2 cores and 2GB RAM which is struggling with memory utilisation.
When I run free -m I regularly get under 50MB free - right now it shows 378MB free with only 1 user actually on the site:
total used free shared buffers cached
Mem: 1869 1772 96 5 34 247
-/+ buffers/cache: 1491 378
Swap: 1023 34 989
When I run ps-aux I see lots of httpd requests which started yesterday and are still open.
apache 5789 0.0 3.8 1038176 72904 ? S 03:18 0:27 /usr/sbin/httpd
apache 5790 0.0 3.3 1029400 64216 ? S 03:18 0:26 /usr/sbin/httpd
apache 5792 0.1 3.4 1031124 65876 ? S 03:18 0:35 /usr/sbin/httpd
apache 28042 0.1 3.3 1029648 64868 ? S 04:53 0:28 /usr/sbin/httpd
apache 28043 0.0 3.8 1038412 73420 ? S 04:53 0:23 /usr/sbin/httpd
apache 31728 0.1 3.8 1038516 73008 ? S 07:53 0:14 /usr/sbin/httpd
root 31912 0.0 0.7 968160 14860 ? Ss 2014 0:03 /usr/sbin/httpd
apache 31914 0.0 0.0 246808 1364 ? S 2014 0:01 /usr/sbin/httpd
apache 31915 0.1 3.7 1038644 71700 ? S 2014 1:02 /usr/sbin/httpd
apache 31916 0.1 3.7 1038480 71844 ? S 2014 0:56 /usr/sbin/httpd
apache 31917 0.0 3.1 1026120 60044 ? S 2014 0:52 /usr/sbin/httpd
apache 31920 0.1 4.1 1045972 79940 ? S 2014 0:59 /usr/sbin/httpd
apache 31921 0.0 3.8 1039180 73040 ? S 2014 0:50 /usr/sbin/httpd
apache 31923 0.1 3.3 1029684 63908 ? S 2014 0:59 /usr/sbin/httpd
apache 31924 0.1 3.2 1027808 61632 ? S 2014 0:53 /usr/sbin/httpd
apache 31927 0.1 3.2 1027844 61664 ? S 2014 0:54 /usr/sbin/httpd
apache 31929 0.1 3.8 1039660 73528 ? S 2014 0:59 /usr/sbin/httpd
apache 31931 0.1 3.2 1028592 62492 ? S 2014 0:58 /usr/sbin/httpd
apache 31933 0.0 3.2 1029036 62876 ? S 2014 0:52 /usr/sbin/httpd
apache 31934 0.1 3.3 1029568 63232 ? S 2014 0:54 /usr/sbin/httpd
apache 32022 0.0 3.8 1038928 73104 ? S 2014 0:41 /usr/sbin/httpd
Output of top sorted by memory usage is:
31920 apache 20 0 1021m 78m 9064 S 0.0 4.2 0:59.48 httpd
31929 apache 20 0 1015m 71m 8428 S 0.0 3.8 1:02.44 httpd
28043 apache 20 0 1014m 71m 9176 S 0.0 3.8 0:26.59 httpd
32022 apache 20 0 1014m 71m 8796 S 0.0 3.8 0:44.04 httpd
31921 apache 20 0 1014m 71m 8408 S 0.0 3.8 0:51.95 httpd
31728 apache 20 0 1014m 71m 8768 S 0.0 3.8 0:15.00 httpd
5789 apache 20 0 1013m 71m 8716 S 0.0 3.8 0:28.57 httpd
591 apache 20 0 1013m 71m 8756 S 0.0 3.8 0:42.92 httpd
31916 apache 20 0 1014m 70m 8368 S 0.0 3.8 0:59.94 httpd
31915 apache 20 0 1014m 70m 8384 S 0.0 3.7 1:04.74 httpd
5792 apache 20 0 1006m 64m 8744 S 0.0 3.4 0:37.37 httpd
5790 apache 20 0 1006m 63m 8800 S 0.0 3.4 0:28.23 httpd
28042 apache 20 0 1005m 63m 9176 S 0.0 3.4 0:29.50 httpd
584 apache 20 0 1006m 62m 8456 S 0.0 3.4 0:37.14 httpd
586 apache 20 0 1006m 62m 8412 S 0.0 3.4 0:44.48 httpd
588 apache 20 0 1006m 62m 8424 S 0.0 3.4 0:43.11 httpd
587 apache 20 0 1006m 62m 8420 S 0.0 3.4 0:47.20 httpd
31923 apache 20 0 1005m 62m 8796 S 0.0 3.3 1:01.21 httpd
31933 apache 20 0 1005m 62m 8376 S 0.0 3.3 0:54.89 httpd
31927 apache 20 0 1004m 60m 8392 S 0.0 3.2 0:58.68 httpd
31924 apache 20 0 1003m 60m 8412 S 0.0 3.2 0:53.68 httpd
31934 apache 20 0 1003m 60m 8408 S 0.0 3.2 0:56.56 httpd
31917 apache 20 0 1003m 60m 8404 S 0.0 3.2 0:54.97 httpd
1871 root 20 0 157m 17m 1968 S 0.0 0.9 0:53.10 lfd
5597 apache 20 0 952m 16m 5212 S 0.0 0.9 0:01.02 httpd
31912 root 20 0 945m 14m 13m S 0.0 0.8 0:03.37 httpd
5854 root 20 0 98364 4676 3672 S 0.0 0.2 0:00.09 sshd
6557 postfix 20 0 82264 4420 3292 S 0.0 0.2 0:00.04 cleanup
6560 postfix 20 0 82168 4316 3324 S 0.0 0.2 0:00.03 smtp
4411 postfix 20 0 81964 4048 3096 S 0.0 0.2 0:00.04 pickup
5856 root 20 0 105m 1944 1528 S 0.0 0.1 0:00.02 bash
In my httpd.conf I have:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
<IfModule prefork.c>
StartServers 4
MinSpareServers 12
MaxSpareServers 24
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 3000
</IfModule>
From the above I assume this means that KeepAlive is on but that it will only keep any session alive for 2 seconds - if that is correct, why do I still have lots of processes running from yesterday and how can I remediate against this?
apache-2.2 httpd.conf
apache-2.2 httpd.conf
edited Jan 1 '15 at 13:02
bhttoan
asked Jan 1 '15 at 12:05
bhttoanbhttoan
3602924
3602924
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
keepalive
and KeepAliveTimeout
only controls how long a session to a client is kept alive, but if the session is closed, that doesn't mean at all that the process gets killed, as any process in your config is allowed to handle up to 3000 requests (MaxRequestsPerChild
).
Your system is configured to keep up to 24 idle Apache processes around (12 are started immediately after you start Apache) (Options MinSpareServers
and MaxSpareServers
).
However, an idle Apache process usually doesn't use all that much RAM on its own, most is shared with all other processes. You need to find out what's really eating up the RAM and why.
add a comment |
To confirm that Apache is taking all your memory, you can use this snipped:
function memperuser()
ps aux
Then type memperuser.
Another useful way to see the shared and private memory break-down is to use ps_mem.py
That will show you how much shared and private memory Apache is consuming.
You should also take a look through all of the LoadModule entries in your httpd.conf and determine if you need all of them. Usually the biggest culprit is mod_php. If you don't need PHP, then simply disable that module. It might get loaded in its own config under httpd.d/
If you are not using PHP, you can also reduce the memory footprint of Apache by using mpm_event or mpm_worker instead of mpm_prefork. The Apache website has some really good documentation on how to use the different MPM modules.
You can get even further reduction of memory footprint by using the latest APR apr, apr-util and apr-iconv and Apache 2.4 branch. How you go about compiling and/or installing that is highly dependent on your setup, so I will defer to your specific OS forums.
All of these options really depend on how you are using Apache.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f655736%2fapache-keepalive-timeout%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
keepalive
and KeepAliveTimeout
only controls how long a session to a client is kept alive, but if the session is closed, that doesn't mean at all that the process gets killed, as any process in your config is allowed to handle up to 3000 requests (MaxRequestsPerChild
).
Your system is configured to keep up to 24 idle Apache processes around (12 are started immediately after you start Apache) (Options MinSpareServers
and MaxSpareServers
).
However, an idle Apache process usually doesn't use all that much RAM on its own, most is shared with all other processes. You need to find out what's really eating up the RAM and why.
add a comment |
keepalive
and KeepAliveTimeout
only controls how long a session to a client is kept alive, but if the session is closed, that doesn't mean at all that the process gets killed, as any process in your config is allowed to handle up to 3000 requests (MaxRequestsPerChild
).
Your system is configured to keep up to 24 idle Apache processes around (12 are started immediately after you start Apache) (Options MinSpareServers
and MaxSpareServers
).
However, an idle Apache process usually doesn't use all that much RAM on its own, most is shared with all other processes. You need to find out what's really eating up the RAM and why.
add a comment |
keepalive
and KeepAliveTimeout
only controls how long a session to a client is kept alive, but if the session is closed, that doesn't mean at all that the process gets killed, as any process in your config is allowed to handle up to 3000 requests (MaxRequestsPerChild
).
Your system is configured to keep up to 24 idle Apache processes around (12 are started immediately after you start Apache) (Options MinSpareServers
and MaxSpareServers
).
However, an idle Apache process usually doesn't use all that much RAM on its own, most is shared with all other processes. You need to find out what's really eating up the RAM and why.
keepalive
and KeepAliveTimeout
only controls how long a session to a client is kept alive, but if the session is closed, that doesn't mean at all that the process gets killed, as any process in your config is allowed to handle up to 3000 requests (MaxRequestsPerChild
).
Your system is configured to keep up to 24 idle Apache processes around (12 are started immediately after you start Apache) (Options MinSpareServers
and MaxSpareServers
).
However, an idle Apache process usually doesn't use all that much RAM on its own, most is shared with all other processes. You need to find out what's really eating up the RAM and why.
answered Jan 1 '15 at 12:56
Sven♦Sven
88.2k10149202
88.2k10149202
add a comment |
add a comment |
To confirm that Apache is taking all your memory, you can use this snipped:
function memperuser()
ps aux
Then type memperuser.
Another useful way to see the shared and private memory break-down is to use ps_mem.py
That will show you how much shared and private memory Apache is consuming.
You should also take a look through all of the LoadModule entries in your httpd.conf and determine if you need all of them. Usually the biggest culprit is mod_php. If you don't need PHP, then simply disable that module. It might get loaded in its own config under httpd.d/
If you are not using PHP, you can also reduce the memory footprint of Apache by using mpm_event or mpm_worker instead of mpm_prefork. The Apache website has some really good documentation on how to use the different MPM modules.
You can get even further reduction of memory footprint by using the latest APR apr, apr-util and apr-iconv and Apache 2.4 branch. How you go about compiling and/or installing that is highly dependent on your setup, so I will defer to your specific OS forums.
All of these options really depend on how you are using Apache.
add a comment |
To confirm that Apache is taking all your memory, you can use this snipped:
function memperuser()
ps aux
Then type memperuser.
Another useful way to see the shared and private memory break-down is to use ps_mem.py
That will show you how much shared and private memory Apache is consuming.
You should also take a look through all of the LoadModule entries in your httpd.conf and determine if you need all of them. Usually the biggest culprit is mod_php. If you don't need PHP, then simply disable that module. It might get loaded in its own config under httpd.d/
If you are not using PHP, you can also reduce the memory footprint of Apache by using mpm_event or mpm_worker instead of mpm_prefork. The Apache website has some really good documentation on how to use the different MPM modules.
You can get even further reduction of memory footprint by using the latest APR apr, apr-util and apr-iconv and Apache 2.4 branch. How you go about compiling and/or installing that is highly dependent on your setup, so I will defer to your specific OS forums.
All of these options really depend on how you are using Apache.
add a comment |
To confirm that Apache is taking all your memory, you can use this snipped:
function memperuser()
ps aux
Then type memperuser.
Another useful way to see the shared and private memory break-down is to use ps_mem.py
That will show you how much shared and private memory Apache is consuming.
You should also take a look through all of the LoadModule entries in your httpd.conf and determine if you need all of them. Usually the biggest culprit is mod_php. If you don't need PHP, then simply disable that module. It might get loaded in its own config under httpd.d/
If you are not using PHP, you can also reduce the memory footprint of Apache by using mpm_event or mpm_worker instead of mpm_prefork. The Apache website has some really good documentation on how to use the different MPM modules.
You can get even further reduction of memory footprint by using the latest APR apr, apr-util and apr-iconv and Apache 2.4 branch. How you go about compiling and/or installing that is highly dependent on your setup, so I will defer to your specific OS forums.
All of these options really depend on how you are using Apache.
To confirm that Apache is taking all your memory, you can use this snipped:
function memperuser()
ps aux
Then type memperuser.
Another useful way to see the shared and private memory break-down is to use ps_mem.py
That will show you how much shared and private memory Apache is consuming.
You should also take a look through all of the LoadModule entries in your httpd.conf and determine if you need all of them. Usually the biggest culprit is mod_php. If you don't need PHP, then simply disable that module. It might get loaded in its own config under httpd.d/
If you are not using PHP, you can also reduce the memory footprint of Apache by using mpm_event or mpm_worker instead of mpm_prefork. The Apache website has some really good documentation on how to use the different MPM modules.
You can get even further reduction of memory footprint by using the latest APR apr, apr-util and apr-iconv and Apache 2.4 branch. How you go about compiling and/or installing that is highly dependent on your setup, so I will defer to your specific OS forums.
All of these options really depend on how you are using Apache.
answered Jan 1 '15 at 14:10
AaronAaron
2,4292826
2,4292826
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f655736%2fapache-keepalive-timeout%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
nWz0 CPId3 4S39fpeOcn9i3h,aJJajOpXU24tb6Y23tL9uNyQ9L5