Korea FreeBSD Users Group News, Internal, Projects, Home
Software, Support, Documentation

[KFUG] freebsd5.1 apache2 php4.3 ...



[ ³¯Â¥¼ø »öÀÎ ] [ ´ñ±Û¼ø »öÀÎ ] [ ÃÖ»óÀ§ »öÀÎ] [ °Ë»ö]

[ÀÌÀü ±Û] [´ÙÀ½ ±Û] [ÀÌÀü ´ñ±Û] [´ÙÀ½ ´ñ±Û]


며칠동안 아카이브 검색도 하고 구글도 뒤져가면서 찾아봤지만
초보에게는 너무 어려운 고난인 것 같습니다.

Xeon 2GHz 듀얼, 1GB 메모리에
INTEL  S7501HG0 메인보드입니다.

- freebsd5.1 설치해서 GENERIC커널을 복사해서 SMP와 ACPI를 활성시킨후 컴파일
- 포트 업그레이드
- apache2 설치
- mod_php4 설치
(mysql, postgresql 등 함께 설치)
했습니다.

처음에는 별 이상없이 동작하는 듯 했으나 php와 db(postgresql이 더 많고 mysql은 얼마 안됩니다.)를 이용하는 버추얼호스트들이 늘어나면서 아파치 프로세스가 giant가 되고, 99%까지 올라가서 내려오지 않는 일이 발생했습니다.
giant프로세스가 새로 생기면 두 프로세스가 47~48%까지 각각 점유하고, 늘어나면 늘어나는 대로 giant프로세스들이 시스템 자원을 전부 먹어버립니다.
httpd를 새로 시작하면 dmesg에는
exit on signal 6
exit on signal 11
등이 기록되었습니다.


apache 1.3으로 새로 설치했지만 1.3을 실행하면
segmentation fault(core dumped)
라는 메세지만 내보내고 실행되지 않습니다.


apache2가 설치된 상황에서
gdb /usr/local/sbin/httpd
를 실행해서 run을 돌리면
별 이상 없다는 메세지가 나올 때도 있지만
address already in use, can't bind to xxx.xxx.xxx.xxx:80
대충 위와 같은 메세지가 나오면서 중단됩니다.
이 때에
netstat -an | grep 80
을 해봐도
80포트를 쓰는 다른 프로그램은 보이질 않았습니다.
아마 httpd가 죽지 않고 계속 남아서 그런 것 같긴 하지만,
무수히 재시작시키고 나서도 마찬가지 였습니다.

얼마 전까지는 giant 프로세스가 나오면
apachectl restart로 잘 해결이 되어서
crontab에 15분마다 apachectl restart를 시켜놓았는데,
여기저기 마구 뒤죽박죽 헤짚어놓다보니
지금은 apachectl restart나 apachectl graceful 등
아파치를 정지시키는 명령을 보내면
기존의 아파치 프로세스는 모두 정지되지만
99%까지 올라가는 새로운 httpd 프로세스가 생깁니다.
브라우저로 접속도 되지 않구요.
이 프로세스를 kill -9으로 죽인 후
새로 apachectl start로 시작해야 합니다.
httpd -k stop이나
/usr/local/etc/rc.d/apache.sh stop
등 어느 걸로 정지시켜도 마찬가지 입니다.


문제 발생시
apachectl stop
kill -9 새프로세스
apachectl start
로 다시 시작하면 error로그에

[Tue Mar 30 16:37:16 2004] [notice] caught SIGTERM, shutting down
[Tue Mar 30 16:37:29 2004] [notice] Apache/2.0.49 (Unix) PHP/4.3.5
configured -- resuming normal operations

가 나타나며,


apapchectl graceful로 다시 시작하려 하면(문제가 해결되지는 않습니다.)

[Tue Mar 30 10:47:34 2004] [notice] SIGHUP received.  Attempting to restart
[Tue Mar 30 10:47:34 2004] [notice] seg fault or similar nasty error
detected in the parent process
[Tue Mar 30 10:47:51 2004] [warn] pid file /var/run/httpd.pid overwritten
-- Unclean shutdown of previous Apache run?
[Tue Mar 30 10:47:51 2004] [notice] Apache/2.0.49 (Unix) PHP/4.3.5
configured -- resuming normal operations

위와 같은 메세지가 error log에 기록됩니다.




이런 상황의 원인이

1. hardware 불량
2. kernel 컴파일시 실수
3. httpd.conf 설정 실수

어디에 있는지 감이 잡히질 않습니다.

memtest를 돌려봐도 이상은 없습니다.

2.번의 경우 maxproc가 너무 작게 잡혀있다던가 하는 게 원인이 될 수 있을까요?
아니면 dmesg에 기록된
ACPI-0660: *** Warning: Type override - [DEB_] had invalid type (Integer)
for Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [MLIB] had invalid type (Integer)
for Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [DATA] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [SIO_] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [LEDP] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [GPEN] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [GPST] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [GP1N] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [WUES] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [WUSE] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [SBID] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [SWCE] had invalid type (String) for
 Scope operator, changed to (Scope)
ACPI-0660: *** Warning: Type override - [CMS2] had invalid type (String) for
 Scope operator, changed to (Scope)

이런 메세지가 나오는데, 이것도 문제일까요?
해결의 기미가 보이지 않아서 어디서 부터 잘못된 건지 정리가 되질 않습니다...ㅜㅜ
_______________________________________________
한국 FreeBSD 사용자 그룹(KFUG) questions 메일링 리스트
questions at kr.FreeBSD.org
http://www.kr.FreeBSD.org/mailman/listinfo/questions


[ ³¯Â¥¼ø »öÀÎ ] [ ´ñ±Û¼ø »öÀÎ ] [ ÃÖ»óÀ§ »öÀÎ] [ °Ë»ö]

Copyright © 1998-2005 Korea FreeBSD Users Group.
All rights reserved. webmaster at kr.FreeBSD.org
$Date: 2004/03/31 14:28:46 $
Powered by FreeBSD