tengine 흔 한 오류 코드 정리 및 원인 분석
4996 단어 NGINX
You don’t have permission to access the URL on this server. Sorry for the inconvenience. Please report this message and include the following information to us.
해결: 권한 파일 권한 보기
500
이 웹 페이지 는 www. test. com 을 제대로 작 동 하지 못 해 현재 이 요청 을 처리 할 수 없습니다.HTTP ERROR 500
원인:
php. ini 설정:
max_execution_time = 5 ; Maximum execution time of each script, in seconds
php - fpm 설정:
request_terminate_timeout = 30
php_code:
$start = time();
while(true) {
if (time()-$start > 5) {
die("game over");
}
}
해결 방법:
The gateway did not receive a timely response from the upstream server or application. Sorry for the inconvenience. Please report this message and include the following information to us. Thank you very much!
장면 재현:
PHP 코드:
tengine 설정:
// fastcgi , 60
fastcgi_connect_timeout 10;
// tengine fastcgi
fastcgi_send_timeout 10;
//fastcgi tengine
fastcgi_read_timeout 10;
원인 중 하나: 게 이 트 웨 이 시간 초과 원인 프로그램 실행 시간 이 tengine 설정 시간 초과 로 게 이 트 웨 이 시간 초과
해결 방법:
The proxy server received an invalid response from an upstream server. Sorry for the inconvenience. Please report this message and include the following information to us. Thank you very much!
장면 재현:
php. ini 설정:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
php - fpm 설정:
request_terminate_timeout = 10
php 코드:
실행 후 tengine 로그
2018/09/21 15:01:50 [error] 32753#0: *8 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 10.33.65.83, server: www.test.com, request: "GET /a.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:8721", host: "www.test.com"
php - fpm 로그:
[21-Sep-2018 16:57:43] WARNING: [pool test] child 824, script '/home/test/www/htdocs/a.php' (request: "GET /a.php") executing too slow (3.963645 sec), logging
[21-Sep-2018 16:57:43] NOTICE: child 824 stopped for tracing
[21-Sep-2018 16:57:43] NOTICE: about to trace 824
[21-Sep-2018 16:57:43] NOTICE: finished trace of 824
[21-Sep-2018 16:57:44] WARNING: [pool test] child 824, script '/home/test/www/htdocs/a.php' (request: "GET /a.php") execution timed out (4.964827 sec), terminating
[21-Sep-2018 16:57:44] WARNING: [pool test] child 824 exited on signal 15 (SIGTERM) after 683.779281 seconds from start
[21-Sep-2018 16:57:44] NOTICE: [pool test] child 838 started
php - fpm 로그 에서 824 프로 세 스에 요청 한 것 을 볼 수 있 습 니 다. 그러나 스 크 립 트 가 실 행 된 시간 이 request terminate timeout 시간 을 초과 하여 824 가 종료 신 호 를 받 았 고 824 가 종료 한 후에 838 프로 세 스 를 새로 시 작 했 습 니 다.
php - fpm 의 worker 프로 세 스 가 시간 초과 (request terminate timeout 초과) 를 실행 하면 스 크 립 트 실행 을 중지 할 뿐만 아니 라 worker 프로 세 스 도 종 료 됩 니 다. 다음 에 새로운 프로 세 스 를 시작 합 니 다. 이번 502 의 원인 은 tengine 의 오류 연결 이 리 셋 된 것 은 php 의 worker 프로 세 스 가 종료 되 었 기 때 문 일 수 있 습 니 다.
원인:
해결 방법:
499
주로 클 라 이언 트 요청 시간 이 초과 되 었 습 니 다 (클 라 이언 트 설정 시간 초과, 예 를 들 어 CURL 이 서버 api 를 호출 할 때).
php. ini 설정
mysqlnd.net_read_timeout = 5
PHP 가 데이터 베 이 스 를 읽 는 최대 실행 시간 을 초과 하면 Mysql server has gone away 에 보고 합 니 다.
참고 자료:https://blog.tanteng.me/2016/03/nginx-buffer-params/ https://www.cnblogs.com/leezhxing/p/6220879.html
추천 자료:https://blog.csdn.net/Mijar2016/article/details/53709777
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
nginx 의 if 내장nginx 설정 에 서 는 if 조건 의 논리 와 & 논리 또는 | 연산 을 지원 하지 않 으 며, if 의 내장 문법 을 지원 하지 않 습 니 다. 그렇지 않 으 면 다음 과 같은 오 류 를 보고 합 니 다: ng...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.