wordpress - Amazon Linux AMI: NGINX: upstream timed out (110: Connection timed out) while reading response header from upstream -


i receive nginx error in error log like:

[error] 4257#0: *3470 upstream timed out (110: connection timed out) while reading response header upstream, client 120.x.x.x 

this wordpress webserver running aws , using nginx reverse proxy. here conf file:

user                 nginx nginx; worker_processes     2; worker_rlimit_nofile 10240;  include /etc/nginx/modules.d/*.conf;  error_log  /var/log/nginx/error.log warn; pid        /var/run/nginx.pid;  events { worker_connections  8192; use epoll; accept_mutex_delay 100ms; }  http { include       /etc/nginx/mime.types; default_type  application/octet-stream;  log_format main     '$remote_addr $server_name $remote_user [$time_local] "$request" '                     '$status $body_bytes_sent "$http_referer" '                     '"$http_user_agent" "$http_x_forwarded_for" $request_time'; log_format backend  '$remote_addr $server_name $remote_user [$time_local] "$request" '                     '$status $body_bytes_sent "$http_referer" '                     '"$http_user_agent" "$http_x_forwarded_for" $request_time'; log_format proxylog '$remote_addr $server_name $remote_user [$time_local] "$request" '                     '$status $body_bytes_sent "$http_referer" '                     '"$http_user_agent" "$http_x_forwarded_for" $request_time '                     '"$http_proxy"';  access_log  /var/log/nginx/access.log  main; access_log  /var/log/nginx/badactor.log proxylog if=$http_proxy;  server_name_in_redirect off; server_tokens      off;  sendfile           on; open_file_cache    max=100 inactive=20s; tcp_nopush         on;  keepalive_timeout  5;  client_max_body_size    4m; client_body_buffer_size 256k;   if_modified_since before;  gzip              on; gzip_http_version 1.0; gzip_vary         on; gzip_comp_level   6; gzip_types        text/plain                   text/xml                   text/css                   text/javascript                   application/xhtml+xml                   application/xml                   application/rss+xml                   application/atom_xml                   application/javascript                   application/x-javascript                   application/x-httpd-php; gzip_disable      "msie [1-6]\.";  # proxy cache proxy_cache_path  /var/cache/nginx/proxy_cache levels=1:2                   keys_zone=czone:32m max_size=256m inactive=1440m; proxy_temp_path   /var/cache/nginx/proxy_temp; proxy_cache_key   "$scheme://$host$request_uri"; proxy_set_header  host               $host; proxy_set_header  x-real-ip          $remote_addr; proxy_set_header  remote-addr        $remote_addr; proxy_set_header  x-forwarded-host   $host; proxy_set_header  x-forwarded-server $host; proxy_set_header  x-forwarded-for    $proxy_add_x_forwarded_for; proxy_set_header  x-forwarded-proto  $scheme; proxy_set_header  x-ua-detect        $mobile; proxy_set_header  accept-encoding    ""; proxy_set_header  proxy              ""; proxy_hide_header x-pingback; proxy_hide_header link; proxy_hide_header etag; proxy_connect_timeout 5; proxy_send_timeout 10; proxy_read_timeout 90; proxy_cache_use_stale timeout invalid_header http_500 http_502 http_503 http_504; proxy_cache_lock on; proxy_cache_lock_timeout 5s; proxy_buffers 8 32k; proxy_buffer_size 64k;  # fastcgi cache #fastcgi_cache_path /var/cache/nginx/fastcgi_cache levels=1:2 #                   keys_zone=fastcgizone:32m inactive=60m; #fastcgi_cache_key "$scheme$request_method$host$request_uri"; #fastcgi_cache_use_stale error timeout invalid_header http_500;  #limit_req_zone $request_method zone=method:1m rate=250r/s;  upstream backend {     server unix:/var/run/nginx-backend.sock; }  upstream phpfpm {     server unix:/var/run/php-fpm.sock; }   include /etc/nginx/conf.d/*.conf; } 

in client side, http 502 (bad gateway) received. wrong?

in nginx.conf file, increased proxy_read_timeout value 300 set 90. after nginx , php-fpm restart, problem has been resolved.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -