{"id":77,"date":"2011-03-15T22:05:15","date_gmt":"2011-03-15T19:05:15","guid":{"rendered":"http:\/\/meekconsulting.com\/?p=77"},"modified":"2011-03-25T22:26:45","modified_gmt":"2011-03-25T19:26:45","slug":"configuring-apache-for-server-monitoring","status":"publish","type":"post","link":"https:\/\/meekconsulting.com\/?p=77","title":{"rendered":"Configuring apache for server monitoring"},"content":{"rendered":"<p>We adjusted some of the apache config parameters to try and keep it from using up all the memory on the server today.<\/p>\n<p>We turned on apache monitoring through mod_monitor which makes the URL:<\/p>\n<p>http:\/\/domain.com\/server-status<\/p>\n<p>Show some good stats on number of servers and what they are doing.<\/p>\n<p>The command <\/p>\n<blockquote><p>watch ps -ylC httpd \u2013sort:rss<\/p><\/blockquote>\n<p>Shows the httpd processes and their memory usage.<\/p>\n<p>We learned that we are using pre-fork module of apache (vs. worker based ) which is what is distributed with REDHAT.<br \/>\nIt uses one process for each request ( not multi-threaded)<\/p>\n<p>The config we adjusted was the MaxRequestsPerChild \u2013 our php queries tend to make the httpd processes GROW over time so we set the max to make them shut down and start a fresh one after 10 requests \u2013 hopefully this will keep the system from running out of memory.<\/p>\n<blockquote><p>## OUR REDHAT APACHE IS COMPILED WITH PREFORK MODULE NOT WORKER<br \/>\n<IfModule prefork.c><br \/>\nStartServers       8<br \/>\nMinSpareServers    5<br \/>\nMaxSpareServers   10<br \/>\nServerLimit      150<br \/>\nMaxClients       150<br \/>\nMaxRequestsPerChild 10<br \/>\n<\/IfModule><\/p>\n<\/blockquote>\n<p>The configs we did to turn on the monitoring are:<\/p>\n<blockquote><p>ExtendedStatus On<br \/>\n<Location \/server-status><br \/>\n    SetHandler server-status<br \/>\n    Order deny,allow<br \/>\n    Deny from all<br \/>\n    Allow from XX.XX.XX.XX<br \/>\n<\/Location><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>We adjusted some of the apache config parameters to try and keep it from using up all the memory on the server today. We turned on apache monitoring through mod_monitor which makes the URL: http:\/\/domain.com\/server-status Show some good stats on &hellip; <a href=\"https:\/\/meekconsulting.com\/?p=77\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/77"}],"collection":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=77"}],"version-history":[{"count":2,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":85,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions\/85"}],"wp:attachment":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}