RadarURL

웹서버,WAS
2014.04.09 18:03

504 Gateway Time-out using Nginx

조회 수 2032 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

It is very common to see a 504 Gateway Time-out using Nginx webserver. This timeout error is generated often by a number of reasons on the backend connection that is serving content. To fix it, you will have to figure out what configuration are you using.

For Nginx + FastCGI (php-fpm), you should try to tweak nginx configuration in this way-:

Try raising max_execution_time setting in php.ini file (CentOS path is /etc/php.ini):

max_execution_time = 300

But, you should also change set request_terminate_timeout parameter (commented by default) at www.conf file from PHP-FPM:

pico -w /etc/php-fpm.d/www.conf

Then set the variable to the same value as max_execution_time:

request_terminate_timeout = 300

Now let’s add fastcgi_read_timeout variable inside our Nginx virtual host configuration:

location ~ \.php$ {
root /var/www/sites/nginxtips.com;
try_files $uri =404;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 300;
}

Then restart nginx:

service nginx restart

For Nginx as Proxy for Apache web server, this is what you have to try:

Add this variables to nginx.conf file:

  proxy_connect_timeout       600;
  proxy_send_timeout          600;
  proxy_read_timeout          600;
  send_timeout                600;

Then restart nginx:

service nginx reload

Popular search terms:

 

출처 : http://www.nginxtips.com/504-gateway-time-out-using-nginx/

TAG •
?

공부 게시판

공부에 도움되는 글을 올려주세요.

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 [공지] 공부 게시판 입니다. 처누 2003.08.18 928092
42 웹서버,WAS http를 https로 리다이렉트하는 여러가지 방법 new JaeSoo 2025.09.10 0
41 웹서버,WAS SSL인증서 없이 HTTPS에서 HTTP로 되돌리기 new JaeSoo 2025.09.10 2
40 웹서버,WAS [SSL] win-acme, Let's encrypt로 무료 SSL 인증서 발급 new JaeSoo 2025.09.10 0
39 웹서버,WAS [SSL] Windows 10에서 Let's Encrypt로 SSL 인증서 무료 발급받기 new JaeSoo 2025.09.10 0
38 웹서버,WAS 무료로 https SSL/TLS 인증서를 발급받을 수 있는 인증 기관 new JaeSoo 2025.09.10 0
37 웹서버,WAS 아파치 서버에 https SSL 인증서 적용하는 방법 (apache httpd) new JaeSoo 2025.09.10 0
36 웹서버,WAS 아파치2(Apache2) SSL HTTPS 적용하기 new JaeSoo 2025.09.10 0
35 웹서버,WAS 아파치 웹서버에 멀티 도메인에 대한 80, 443 포트 설정하는 방법 newfile JaeSoo 2025.09.10 0
34 웹서버,WAS 용량 산정 (동시 접속자 계산) JaeSoo 2016.05.05 1028
33 웹서버,WAS 아파치 httpd.conf 재시작 없이 설정 적용하기 JaeSoo 2016.05.02 646
32 웹서버,WAS Tomcat JVM heap memory set 및 size JaeSoo 2016.03.23 706
31 웹서버,WAS Java 실행 옵션 정리 JaeSoo 2016.03.23 624
30 웹서버,WAS [JAVA] 개발환경설정 - 표준프레임워크 file JaeSoo 2016.01.02 791
29 웹서버,WAS Tomcat 7.x 와 8.x 간의 default configuration 차이 JaeSoo 2016.01.02 717
28 웹서버,WAS 톰캣 8 소개 JaeSoo 2016.01.01 517
27 웹서버,WAS 리눅스 webalizer를 통한 apache log(웹서버 접속 통계) 분석하기 (추천) JaeSoo 2014.12.25 1098
26 웹서버,WAS 리눅스 아파치 로그 뷰어 webalizer, utf-8로 변환하기 file JaeSoo 2014.12.22 880
25 웹서버,WAS Webalizer Configuration – Configure Webalizer for SEO JaeSoo 2014.12.22 1413
24 웹서버,WAS Webalizer, AWStats에서 국가 정보 확인하기 file JaeSoo 2014.12.22 854
23 웹서버,WAS Webalizer에서 국가별 로그 출력하기 file JaeSoo 2014.12.22 1082
Board Pagination Prev 1 2 3 Next
/ 3


즐겨찾기 (가족)

JAESOO's HOMEPAGE


YOUNGAE's HOMEPAGE


장여은 홈페이지


장여희 홈페이지


장여원 홈페이지


즐겨찾기 (업무)

알리카페 홀릭

숭실대 컴퓨터 통신연구실 (서창진)

말레이시아 KL Sentral 한국인 GuestHouse


즐겨찾기 (취미)

어드민아이디

유에코 사랑회

아스가르드 좋은사람/나쁜사람

JServer.kr

제이서버 메타블로그

재수 티스토리


즐겨찾기 (강의, 커뮤니티)

재수 강의 홈페이지


한소리


VTMODE.COM


숭실대 인공지능학과


숭실대 통신연구실


베너