# Host not found in upstream

**URL:** <https://www.ruby-forum.com/t/host-not-found-in-upstream/205017>\
**Category:** NGINX\
**Created:** [March 27, 2011, 5:47am UTC](https://www.ruby-forum.com/t/host-not-found-in-upstream/205017 "2011-03-27T05:47:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 27, 2011, 5:47am UTC](https://www.ruby-forum.com/t/host-not-found-in-upstream/205017/1 "2011-03-27T05:47:25Z")

</div>

Hello,  
I use nginx server as a reverse proxy for a lot of diferent origins.  
Many virtualhosts with many upstream servers. I dont have total control  
of hostnames that will be configured on upstreams.This configuration  
will be done automatically based on what my clients configure on my  
solution CP. So I have some problems:

- One client can use invalid or wrong values, that does not resolver  
and put down all my server.
- I dont have control of hostname, if client make any change to the  
hostname or put down his dns server my nginx server can stop.
- If nginx cant contact my resolver all my soltion will go down

Use ip or hosts file is not a option because of environment  
variability.  
I see this post [Re: Nginx reverse proxy crash when dns unavailable](http://forum.nginx.org/read.php?2,15995,16062) about the  
problem. I dont found any soltions for it.

Can that problem or behavior can be easy treaty by a patch? Nginx  
developer team have a roadmap or intent to change it? Can i pay for a  
patch that workaround this problem?

Thanks

Sky

Posted at Nginx Forum:

> **[host not found in upstream](https://forum.nginx.org/read.php?2,186036,186036#msg-186036)**
>
> Hello, I use nginx server as a reverse proxy for a lot of diferent origins. Many virtualhosts with many upstream servers. I dont have total control of hostnames that will be configured on upstreams.This configuration will be done automatically based...

---

<div class="post-metadata">

**Author:** ![skyshade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6bbea6/32.png) [@skyshade](https://www.ruby-forum.com/u/skyshade)\
**Post date:** [December 12, 2011, 5:17pm UTC](https://www.ruby-forum.com/t/host-not-found-in-upstream/205017/2 "2011-12-12T17:17:42Z")

</div>

Hi,

I am interested in this as well (dynamic setup in a proxmox/openVZ  
environment where the hostname abstraction is quite useful as (virtual)  
network adapters change often)  
What is so bad about the following:

- Try to resolve all names on startup and put them in the DNS in-memory  
cache (current behaviour)
- just ignore non-resolvable hosts but log an error (new behaviour)
- if there is a request to the a non-resolvable host, try to resolve it  
again (gethostbyname()) and if successful, put it in the in-memory cache  
(new behaviour).
- Alternatively/Additionallly, do step 1 every couple of minutes to  
update the cache

Would really help!

Thanks and regards,  
fatzopilot

Posted at Nginx Forum:

> **[Re: host not found in upstream](https://forum.nginx.org/read.php?2,186036,219939#msg-219939)**
>
> Hello, I use nginx server as a reverse proxy for a lot of diferent origins. Many virtualhosts with many upstream servers. I dont have total control of hostnames that will be configured on upstreams.This configuration will be done automatically based...
