Skip to content
조회 수 2773 추천 수 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
번호 분류 제목 날짜 조회 수
137 컴퓨터잡담 로블록스 스튜디오 파트속성 2021.09.28 3089
136 [Docs]스프레드시트 구글 스프레드시트 쿼리 사용하기 #2 2021.09.26 3052
135 파이썬 파이썬 키움openAPI 보유종목 종목리스트 피라미드 매수주문하기 2021.09.16 3035
134 컴퓨터잡담 파이썬 Beautifulsoup html의 특정 주소만 가져오기 file 2021.06.14 2986
133 Server XE 스케치북 모바일 비회원 댓글쓰기에서 홈페이지 이메일 기입란 삭제하기 2016.04.08 2981
132 파이썬 파이썬 변수내용 문자열 자르기 특이한 점 2021.09.27 2965
131 컴퓨터잡담 파이썬의 IF문 사용시 실행값에서 오류발생시 진행하는 예외처리 방법 2021.06.15 2877
130 Server XE PC에서 모바일화면 출력방법 file 2016.09.08 2855
129 컴퓨터잡담 한글입력이 안될때(how to hangul ...) file 2021.01.08 2839
128 Server [php.ini]XE 신디케이션 OpenSSL 오류문구 해결방법 file 2016.08.25 2816
127 Server ECS P43T-AD3, Asus C381GM, Driver(두번째 사용했던 서버 드라이버) file 2016.04.12 2804
» Server 아파치 캐시 설정 이후 잦은 아파치 자동멈춤 현상 원인분석 3 2016.03.23 2773
125 파이썬 파이썬 datetime 모듈로 초간단 날짜 표현하기 2021.09.11 2714
124 컴퓨터잡담 크롬 캐시파일 삭제방법(Chrome cache file delete) file 2016.11.27 2708
123 컴퓨터잡담 동영상 자르기 프로그램 file 2014.04.14 2704
122 WindowsTip 응용 프로그램 구성 이 올바르지 않기 때문에 이 응용 프로그램 을 시작 하지 못했습니다 2015.02.06 2687
121 [Docs]스프레드시트 구글 스프레드시트 스크립트를 사용하여 지메일로 이메일을 보내기 2023.03.10 2678
120 WindowsTip 윈도우 하드에서 설치하기 2015.02.17 2667
119 컴퓨터잡담 파이썬 자주 발생되는 에러(오류) 대처방법 file 2021.06.05 2663
118 Server innodb_use_sys_malloc to FALSE 2016.08.24 2637
Board Pagination Prev 1 ... 38 39 40 41 42 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소