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
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;








0















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?










share|improve this question






























    0















    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?










    share|improve this question


























      0












      0








      0








      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 1 '15 at 13:02







      bhttoan

















      asked Jan 1 '15 at 12:05









      bhttoanbhttoan

      3602924




      3602924




















          2 Answers
          2






          active

          oldest

          votes


















          0














          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.






          share|improve this answer






























            0














            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.






            share|improve this answer























              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
              );



              );













              draft saved

              draft discarded


















              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









              0














              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.






              share|improve this answer



























                0














                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.






                share|improve this answer

























                  0












                  0








                  0







                  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.






                  share|improve this answer













                  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.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 1 '15 at 12:56









                  SvenSven

                  88.2k10149202




                  88.2k10149202























                      0














                      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.






                      share|improve this answer



























                        0














                        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.






                        share|improve this answer

























                          0












                          0








                          0







                          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.






                          share|improve this answer













                          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.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 1 '15 at 14:10









                          AaronAaron

                          2,4292826




                          2,4292826



























                              draft saved

                              draft discarded
















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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
                              DZ3 owh7KwcYK eKyDjPzskr1qgfOpq39L,w Hi,J0UnTSF4Del

                              Popular posts from this blog

                              Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                              Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                              Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020