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
번호 분류 제목 날짜 조회 수
857 컴퓨터잡담 mysql 재시작, 사용자 추가 명령어 1 2 2009.11.19 32229
856 프로세스 reader_sl.exe , AdobeARM.exe 프로세스 삭제방법 3 2011.02.13 32055
855 컴퓨터잡담 MySQL TABLE 손상시 대응방법(db 내용이 안 나올때) file 2009.08.24 31833
854 컴퓨터잡담 네이버 만화 PHP로 RSS 출력 만들기 file 2009.08.05 31787
853 컴퓨터잡담 컴퓨터 OS부팅도 이젠 초고속 전쟁이다. 3 2009.08.07 31754
852 컴퓨터잡담 엑셀에서 날짜와 시간 계산하는 법 2 2010.09.20 31665
851 컴퓨터잡담 VBA - 시트/셀, 엑셀 값만 복사하기! (VBA을 이용한 복사영역 조절) 2011.10.04 31420
850 파이썬 자바스크립트 종말각?! HTML에서 파이썬 실행하는 PyScript 등장! 2022.06.08 31257
849 Excel Excel Vba) 현재 셀에서 한줄내림 (activecell.offset(1,0).Select) 3 2012.01.05 31020
848 컴퓨터잡담 네이버, 다음지식 php로 RSS 출력 만들기 1 file 2009.08.05 31009
847 프로세스 PF사용...페이징 중지를 통한 시스템 성능개선 2011.04.10 30890
846 컴퓨터잡담 eXCEL VBA)엑셀파일 열지않고 내용 불러오기 3 2011.10.23 30518
845 AutoHotKey autohotkey) 윈도우 ahk_id 추출하기 2 2012.03.06 30088
844 컴퓨터잡담 rss리더기 2010.03.12 30007
843 [Docs]스프레드시트 Google Spreadsheet (Docs) 에서 우리은행 환율정보 이용하기 2014.11.11 29869
842 컴퓨터잡담 한글 HEX 코드표 1 5 2010.03.17 29529
841 Excel Excel) 엑셀 콤보박스 대화상자 목록지정하기 2011.12.21 29390
840 컴퓨터잡담 Excel VBA) 원하는 범위 지정한 뒤 복사하여 붙여넣기 2 2011.10.14 29387
839 컴퓨터잡담 curl로 다음 자동로그인 가능하다. 2 5 2009.06.30 28914
838 AutoHotKey autohotkey) 편입 변수 4 2012.03.13 28888
Board Pagination Prev 1 2 3 4 5 6 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소