Skip to content
조회 수 2770 추천 수 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 서버 부하상태 체크 file 2016.04.30 1709
71 Server 서버 다운시 알람 기능 사용방법(http ping port) file 2017.05.04 10364
70 Server 램드라이브를 이용한 mysql 번개속도로 개선방법 file 2016.11.27 5238
69 Server 댓글쓰기 - 스케치북 게시판 로그인 사용자만 댓글쓰기 2017.04.05 5159
68 Server [아파치 error.log] Fatal Error Unable to reattach to base address file 2016.03.25 1643
67 Server [php.ini]XE 신디케이션 OpenSSL 오류문구 해결방법 file 2016.08.25 2816
66 Server [mysql] Created tmp disk tables 디스크 쓰기방지 대안 1 2016.11.26 5162
65 Server [Apache] mod_expires .htaccess을 수정하여 브라우저 캐싱하기 2016.03.16 1658
64 Server ZipperUpper! 애드온 이런것이 있었다니? file 2016.12.14 4606
63 Server XpressEngine 최적화 기진곰님의 슈퍼캐시 테스트 file 2016.09.19 5016
62 Server XE성능 캐시활용으로 속도 100배 개선하기(Varnish 캐시서버 + XE(+패치) + nginx(혹은 아파치) / Wincache) file 2016.03.04 1449
61 Server xe 타이틀 게시판 이름 없애기 file 2016.06.28 1803
60 Server XE 카카오톡 글전송 2015.07.08 1223
59 Server XE 업데이트 후 모듈업데이트가 안될때 참고 file 2015.03.13 1440
58 Server XE 어느날 갑자기 다운로드가 되지 않을때 해결방법 file 2016.04.07 1351
57 Server XE 스케치북 모바일 비회원 댓글쓰기에서 홈페이지 이메일 기입란 삭제하기 2016.04.08 2979
56 Server XE 스케치북 게시판 웹진형에서 사진과 요약글 출력방법 file 2016.12.05 5203
55 Server XE 반응형 모바일 메타태그 삽입하기 2016.08.14 3687
54 Server XE 모바일 default 기본스킨 views 값 나타내기 file 2017.05.06 6795
53 Server XE 리퍼러 모듈로 트래픽 발생에 대처방법 file 2016.04.17 1410
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소