Skip to content
조회 수 2751 추천 수 0 댓글 3
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

아파치 캐시 설정 이후 잦은 아파치 자동멈춤 현상이 발생되어 원인분석을 해봐야 겠다.

우선 php.ini 의 OPCACHE 캐시설정

;extension=php_opcache.dll
zend_extension=php_opcache.dll


; Zend OPCache 활성화 여부 결정. 
opcache.enable=1 
  
; PHP CLI 버전에서 Zend OPCache 활성화 여부 결정. 
opcache.enable_cli=0 
  
; OPCache 공유 메모리 저장소 사이즈 
;원본 : opcache.memory_consumption=64 
opcache.memory_consumption=128
  
; 메모리에서 interned 문자열을 위해 사용할 메모리량 
; interned string 에 대해서는 https://wiki.php.net/rfc/performanceimprovements 참조. 
;opcache.interned_strings_buffer=4 
opcache.interned_strings_buffer=4
  
; OPCache 해쉬 테이블에서 가질수 있는 키값의 최대 값. 
; 이는 200 ~ 100000 사이에 값만 가질 수 있다. 
opcache.max_accelerated_files=2000 
  
; 재시작이 스케줄 될때까지 "wasted" 최대 메모리 비율(percentage) 
opcache.max_wasted_percentage=1 
  
; 이 값을 활성화 하면, OPCache 는 현재 작업디렉토리를 스크립트 키에 추가하고, 
; 같은 이름(basename) 을 가진 파일들사이에 가능한 충돌을 제거하게 된다. 
; 이 값을 비활성화하면 성능이 향상되지만, 존재하는 애플리케이션이 깨질 수 있다. 
;opcache.use_cwd=1 
  
; 이것을 비활성화하면, OPCache 를 수동으로 리셋해주거나 
; 파일시스템이 변한것에대해 효과를 얻기위해서는 웹서버를 재시작 해줘야만 한다. 
opcache.validate_timestamps=1 
  
; 공유 메모리 저장소 할당을 위해서 변화된 것들에 대해 얼마나 자주 파일 타임스템프 
; 를 체크(초단위)할지를 정한다. ("1" means validate once per second, but only once per request. "0" 은 늘 유효성 검사를 한다.) 
; XE 사용자는 0이 맞단다. 글쓰고 난 후 클릭해도 바로 안나오는 오류가 발생됨.
opcache.revalidate_freq=10
  
; include_path 최적화에서 파일 서치(search)를 할지 말지 결정. 
opcache.revalidate_path=1 
  
; 이것을 비활성화 할 경우, 모든 PHPDoc 코멘트는 최적화 코드 사이즈를 줄이기 위해서 
; 코드로부터 삭제된다. 
opcache.save_comments=0 

 

httpd.conf

# gzip 대신 쓰는 압축
LoadModule deflate_module modules/mod_deflate.so

# 브라우저 캐시관련
LoadModule expires_module modules/mod_expires.so

#디스크캐시 일단 다시 비활성
LoadModule cache_disk_module modules/mod_cache_disk.so

# 2016년 3월 22일 갑자기 0으로 변경했다. 또 뻣을까?

# MaxRequestsPerChild  5000 초기값
MaxRequestsPerChild  0 #수정함.

 

 

mpm.conf

# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestWorkers: maximum number of worker threads
# MaxConnectionsPerChild: maximum number of connections a server process serves
#   스타트서버 * 맥스퍼차일드 = 500 총접속쓰레드
<IfModule mpm_event_module>
    StartServers             5
    MinSpareThreads         20
    MaxSpareThreads        200
    ThreadsPerChild        100
    MaxRequestWorkers      300
    MaxConnectionsPerChild   0
</IfModule>

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxConnectionsPerChild: maximum number of connections a server process serves
<IfModule mpm_winnt_module>

#    ThreadLimit             500
    ThreadsPerChild         500
    MaxConnectionsPerChild 50000
</IfModule>
 

수정해 봤는데 또 멈출까?

 

로그인 후 댓글쓰기가 가능합니다.

?
  • ?
    Progress 2016.03.23 14:42
    http://jace.tistory.com/m/post/100

    Keepalive
  • ?
    Progress 2016.03.25 07:53

    67023 2016] [mpm_winnt:notice] [pid 2672:tid 396] AH00358: Child: Process exiting because it reached MaxConnectionsPerChild. Signaling the parent to restart a new child process.
    [Fri Mar 25 01:52:55.467023 2016] [mpm_winnt:notice] [pid 2116:tid 480] AH00424: Parent: Received restart signal -- Restarting the server.
    Fri Mar 25 01:52:55 2016 (9872): Fatal Error Unable to reattach to base address
    [Fri Mar 25 01:52:57.472281 2016] [mpm_winnt:notice] [pid 2672:tid 396] AH00364: Child: All worker threads have exited.
    [Fri Mar 25 07:37:15.505060 2016] [core:warn] [pid 4424:tid 344] AH00098: pid file C:/AutoSet9/server/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Fri Mar 25 07:37:15.532063 2016] [mpm_winnt:notice] [pid 4424:tid 344] AH00455: Apache/2.4.10 (Win64) PHP/5.6.0 configured -- resuming normal operations
    [Fri Mar 25 07:37:15.532063 2016] [mpm_winnt:notice] [pid 4424:tid 344] AH00456: Apache Lounge VC11 Server built: Jul 17 2014 12:58:29
    [Fri Mar 25 07:37:15.532063 2016] [core:notice] [pid 4424:tid 344] AH00094: Command line: 'C:\\AutoSet9\\Server\\bin\\httpd.exe -d C:/AutoSet9/server -D C:\\AutoSet9\\Server\\conf\\httpd.conf'
    [Fri Mar 25 07:37:15.533064 2016] [mpm_winnt:notice] [pid 4424:tid 344] AH00418: Parent: Created child process 860
    [Fri Mar 25 07:37:16.073133 2016] [mpm_winnt:notice] [pid 860:tid 448] AH00354: Child: Starting 500 worker threads.

     

  • ?
    Progress 2016.03.25 08:06
    음...
    왜?
    Maxrequestperchild 가..

List of Articles
번호 분류 제목 날짜 조회 수
72 Server XE PC에서 모바일화면 출력방법 file 2016.09.08 2835
71 Server XE Request 줄이기 file 2016.09.07 1937
70 Server Apache에 대한 mod_proxy 지원 구성 2016.09.06 1801
69 Server [php.ini]XE 신디케이션 OpenSSL 오류문구 해결방법 file 2016.08.25 2816
68 Server innodb_use_sys_malloc to FALSE 2016.08.24 2637
67 Server innodb_use_sys_malloc에 따라 The InnoDB memory heap is disabled mysql error 메시지 1 2016.08.23 3794
66 Server XE file cache 활용 2016.08.19 1648
65 Server 아파치 mod_cache mod_disk_cache 알아보기 7 2016.08.18 3096
64 Server XE 반응형 모바일 메타태그 삽입하기 2016.08.14 3687
63 Server mysql 16CPU / 16GB My.cnf 1 2016.07.26 2501
62 Server mysql 테이블 손상시 #1146 - Table 해결방법 file 2016.07.17 8905
61 Server xe 타이틀 게시판 이름 없애기 file 2016.06.28 1803
60 Server 서버 부하상태 체크 file 2016.04.30 1709
59 Server XE Content font-size:수정방법 file 2016.04.19 1864
58 Server XE <title>제목 - 사이트명</title> 으로 변경방법 2016.04.19 2055
57 Server XE 리퍼러 모듈로 트래픽 발생에 대처방법 file 2016.04.17 1409
56 Server ECS P43T-AD3, Asus C381GM, Driver(두번째 사용했던 서버 드라이버) file 2016.04.12 2804
55 Server XE 스케치북 모바일 비회원 댓글쓰기에서 홈페이지 이메일 기입란 삭제하기 2016.04.08 2979
54 Server XE 어느날 갑자기 다운로드가 되지 않을때 해결방법 file 2016.04.07 1351
53 Server 윈도우 TCP 연결의 개수를 최대한 늘이기 2016.03.26 3455
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소