apache 관련 질문입니다.
리눅스 서버에 Apache/2.0.49 를 작년부터 설치해서 별 문제 없이 사용하고 있었고,
얼마전까지만 해도 별 문제가 없었습니다.
그런데 갑자기 1달쯤 전부터 서버가 죽기 시작하더니, 주 1회 다운되던 서버가 급기야 일 1회 다운되는 상황입니다.
로그를 봐도 정확히 모르겠고,
top 를 해 보면
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
6202 tomcat 25 0 113M 113M 34640 S 0.1 5.6 0:24 1 java
18964 nobody 15 0 19724 19M 5892 S 0.0 0.9 0:01 0 httpd
18975 nobody 15 0 17592 17M 5876 S 0.0 0.8 0:01 0 httpd
18893 nobody 15 0 17584 17M 5868 S 0.0 0.8 0:01 0 httpd
18993 nobody 15 0 17580 17M 5860 S 0.0 0.8 0:01 0 httpd
19039 nobody 15 0 17016 16M 5840 S 0.0 0.8 0:00 1 httpd
18928 nobody 15 0 16988 16M 5868 S 0.0 0.8 0:01 1 httpd
1515 nobody 15 0 16772 16M 5888 S 0.0 0.8 0:01 0 httpd
18937 nobody 15 0 16608 16M 5860 S 0.0 0.8 0:01 0 httpd
18990 nobody 15 0 16452 16M 5884 S 0.0 0.7 0:01 1 httpd
18967 nobody 15 0 16352 15M 5848 S 0.0 0.7 0:01 0 httpd
18927 nobody 15 0 16224 15M 5840 S 0.0 0.7 0:01 0 httpd
18925 nobody 15 0 16168 15M 5876 S 0.0 0.7 0:01 1 httpd
18992 nobody 15 0 16072 15M 5824 S 0.0 0.7 0:01 0 httpd
19001 nobody 15 0 16048 15M 5832 S 0.0 0.7 0:00 0 httpd
18991 nobody 15 0 16000 15M 5860 S 0.0 0.7 0:01 0 httpd
19007 nobody 15 0 15988 15M 5860 S 0.0 0.7 0:01 1 httpd
18917 nobody 15 0 15944 15M 5832 S 0.0 0.7 0:01 0 httpd
19012 nobody 15 0 15900 15M 5892 S 0.0 0.7 0:01 0 httpd
18922 nobody 15 0 15892 15M 5872 S 0.0 0.7 0:00 0 httpd
18979 nobody 15 0 15880 15M 5844 S 0.1 0.7 0:01 1 httpd
23219 nobody 15 0 15864 15M 5884 S 0.0 0.7 0:01 1 httpd
23574 nobody 15 0 15848 15M 5864 S 0.1 0.7 0:01 0 httpd
18947 nobody 15 0 15544 15M 5900 S 0.0 0.7 0:01 0 httpd
18989 nobody 15 0 15528 15M 5856 S 0.0 0.7 0:00 0 httpd
18909 nobody 15 0 15428 15M 5852 S 0.0 0.7 0:01 1 httpd
18950 nobody 15 0 15420 15M 5872 S 0.0 0.7 0:00 0 httpd
18944 nobody 15 0 15384 15M 5848 S 0.0 0.7 0:01 1 httpd
19062 nobody 15 0 15384 15M 5900 S 0.0 0.7 0:00 0 httpd
18942 nobody 15 0 15376 15M 5956 S 0.0 0.7 0:01 0 httpd
18908 nobody 15 0 15352 14M 5852 S 0.0 0.7 0:01 0 httpd
18920 nobody 15 0 15336 14M 5804 S 0.0 0.7 0:01 1 httpd
18956 nobody 15 0 15296 14M 5856 S 0.0 0.7 0:01 0 httpd
18905 nobody 15 0 15260 14M 5872 S 0.0 0.7 0:01 0 httpd
19010 nobody 15 0 15232 14M 5888 S 0.0 0.7 0:01 0 httpd
18948 nobody 15 0 15212 14M 5880 S 0.0 0.7 0:01 0 httpd
18931 nobody 15 0 15080 14M 5864 S 0.0 0.7 0:01 1 httpd
18954 nobody 15 0 15072 14M 5872 S 0.0 0.7 0:01 0 httpd
18969 nobody 15 0 15072 14M 5812 S 0.0 0.7 0:00 1 httpd
18904 nobody 15 0 15060 14M 5864 S 0.0 0.7 0:00 0 httpd
18918 nobody 15 0 15028 14M 5856 S 0.0 0.7 0:00 0 httpd
18976 nobody 15 0 15024 14M 5864 S 0.0 0.7 0:01 0 httpd
18958 nobody 15 0 15000 14M 5816 S 0.1 0.7 0:00 1 httpd
18940 nobody 15 0 14992 14M 5880 S 0.0 0.7 0:01 1 httpd
18982 nobody 15 0 14956 14M 5876 S 0.0 0.7 0:00 1 httpd
23573 nobody 15 0 14948 14M 5856 S 0.0 0.7 0:00 0 httpd
18986 nobody 15 0 14944 14M 5864 S 0.0 0.7 0:00 0 httpd
19014 nobody 15 0 14912 14M 5848 S 0.0 0.7 0:01 0 httpd
18930 nobody 15 0 14896 14M 5872 S 0.0 0.7 0:01 1 httpd
19017 nobody 15 0 14872 14M 5872 S 0.0 0.7 0:00 0 httpd
위와같이 httpd 가 엄청나게 많이 떠서 메모리를 엄청나게 잡아먹고 있습니다.
ps -ef 를 하면 말도 못할정도로 프로세스가 떠있지요-_-
nobody 18891 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18892 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18893 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18894 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18896 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18898 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18902 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18903 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18904 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18905 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18907 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18908 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18909 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18912 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18913 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18914 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18915 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18916 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18917 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18918 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18920 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18921 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18922 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18924 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18925 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18926 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18927 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18928 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18929 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18930 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18931 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18932 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18934 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18936 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18937 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18938 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18940 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18941 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18942 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18943 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18944 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18947 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18948 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18950 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18952 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18953 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18954 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18955 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18956 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18957 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18958 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18961 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18962 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18964 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18966 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18967 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18968 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18969 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18970 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18973 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18974 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18975 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18976 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18979 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18981 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18982 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18985 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18986 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18987 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18989 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18990 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18991 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18992 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18993 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 18994 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 18999 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19000 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19001 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19004 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19007 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19008 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19009 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19010 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19011 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19012 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19014 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19015 18890 0 17:00 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19017 18890 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19038 18890 0 17:01 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19039 18890 0 17:01 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19053 18890 0 17:03 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 19058 18890 0 17:03 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19061 18890 0 17:03 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19062 18890 0 17:03 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19063 18890 0 17:03 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19064 18890 0 17:03 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19072 18890 0 17:03 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 19076 18890 0 17:03 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 28058 18890 0 17:05 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 30272 18890 0 17:06 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 3029 18890 0 17:06 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 23208 18890 0 17:08 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 23218 18890 0 17:08 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 23219 18890 0 17:08 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 23572 18890 0 17:08 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 23573 18890 0 17:08 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 23574 18890 0 17:08 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 23576 18890 0 17:08 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1453 18890 0 17:11 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1514 18890 0 17:15 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1515 18890 0 17:15 ? 00:00:01 /usr/local/apache2/bin/httpd -k start
nobody 1556 18890 0 17:19 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1557 18890 0 17:19 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1687 18890 0 17:29 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1688 18890 0 17:29 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1689 18890 0 17:29 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1690 18890 0 17:29 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1691 18890 0 17:29 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1842 18890 0 17:33 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1915 18890 0 17:40 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1917 18890 0 17:40 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1919 18890 0 17:40 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1920 18890 0 17:40 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1921 18890 0 17:40 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1922 18890 0 17:40 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 1923 18890 0 17:40 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
root 18890 1 0 17:00 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2027 18890 0 17:49 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2028 18890 0 17:49 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2029 18890 0 17:49 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2041 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2042 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2043 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2044 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2045 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2046 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2047 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2049 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2050 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2051 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2052 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2053 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2054 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2055 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2057 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2058 18890 0 17:50 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2310 18890 0 18:03 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2326 18890 0 18:04 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2327 18890 0 18:04 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
nobody 2328 18890 0 18:04 ? 00:00:00 /usr/local/apache2/bin/httpd -k start
최근들어 갑자기 접속자가 늘어났거나, 특정 서비스를 추가 한적도 없습니다.
하도 답답해서 오늘 서버 메모리를 1G 추가 했는데 불안불안 하네요.
httpd 가 클라이언트가 늘어날때마다 하나씩 늘어나는건 아닐텐데,
혹시 이런 비슷한 문제를 해결 해 보신분 있으면 해결책좀 알려주십시요.
접속자가 늘어나지
접속자가 늘어나지 않더라도 데몬이 급격하게 늘어나는 경우라면,
웜으로 인한 접속수 증가가 한 원인일 수 있습니다.
(access.log 를 확인해 보시면 되겠네요)
실제 접속수가 많지 않다면, apache 설정을 손을 봐서 최대 프로세스 갯수를 조정해 주면 될 듯 싶네요..
저정도의 apache 프로세스가 뜰려면 접속수가 꽤 많은 경우에나 저정도 뜹니다;;
최대 프로세스
최대 프로세스 개수를 60개로 줄여놓고 모니터링 중입니다.
각각의 프로세스별로 메모리를 많이 잡아먹는것은 어떠한 방식으로 해결책에 접근해야 할까요?
다른 서버를 보면 이렇게 메모리를 많이 잡아먹지는 않는거 같은데 말이죠.
댓글 달기