nginx: [emerg] host not found in upstream

Praveen Kumar K S praveenssit at gmail.com
Mon Dec 14 07:15:00 UTC 2020


Hello,

I'm facing issue where if one of the upstream servers is down, nginx going
to emerg mode with the subjected error.
My requirement is, nginx should go down when all of the upstream servers
are down.
But when even one of the upstream servers is up, nginx should still serve
the requests by proxying requests to that one live upstream server. Any
help would be appreciated.

Below is my conf































*events {    worker_connections 4096;}http {  error_log
/etc/nginx/error_log.log warn;  client_max_body_size 20m;  log_format
upstreamlog '$server_name to: $upstream_addr {$request} '
'upstream_response_time $upstream_response_time'  ' request_time
$request_time';  proxy_cache_path /etc/nginx/cache keys_zone=one:500m
max_size=1000m;  access_log /var/log/nginx/nginx-access.log
upstreamlog;upstream app.localhost {        # simple round-robin
server app-1:9763 fail_timeout=60s;        server app-2:9763
fail_timeout=60s;        server app-3:9763 fail_timeout=60s;       }server
{        listen 80;        server_name app.localhost;        location / {
                proxy_pass xxxx        }}}*

-- 


*Regards,*


*K S Praveen Kumar*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20201214/414cf439/attachment.htm>


More information about the nginx mailing list