How do I disable DNS Caching and DNS Reverse Lookup in Nginx ?

linuxr00lz2013 nginx-forum at
Mon Jan 6 17:35:46 UTC 2014

Hello thank you for your reply!

1) I have shown you the real configuration and logs. All I changed was the
FQDN's because I dont know if I am allowed by my company to post them

2) Which tests do you recommend I run using telnet and curl? I am not too
familiar with using curl so any guidance will be greatly appreciated!


Maxim Dounin Wrote:
> Hello!
> On Wed, Jan 01, 2014 at 10:54:13AM -0500, linuxr00lz2013 wrote:
> > Hello Happy New year and thank you for the reply!
> > 
> > I dont think thats the cause, because I tried clearing the cache and
> it was
> > still stlow! Is there a special directive that I have to use to get
> it to
> > stop caching?
> Unfortunately, there is no magic directive "do it all right".  
> There is no DNS caching in nginx which survives configuration 
> reload, and there are no reverse DNS lookups in http module at 
> all.
> Unfortunately, you don't show us real configuration and real logs, 
> so basically nobody here can help with debugging, but general tips 
> are:
> 1) Make sure you are testing it right.  This basically means 
> you'll have to forget about browsers as they are too complex to be 
> usable as testing tools and use telnet or curl for basic tests.  
> And make sure to watch logs while doing tests.
> 2) Make sure you've configured it right.  Make sure to understand 
> what you write in your configuration, make sure to test what you 
> wrote ("nginx -t" is your friend, as well as error log), and avoid 
> stupid mistakes like infinite loops.  See above for recommended 
> testing tools.
> 3) Avoid descriptive terms like "really", "painfully", "awfully" - 
> measure instead.  If a request takes 60 milliseconds - it may be 
> either really fast or really slow, depeding on use case.  
> Moreover, exact numbers are usually help a lot with debugging.  If 
> something takes 60 seconds - it usually means that there is 60 
> second timeout somewhere (one of configure upstream servers can't 
> be reached?).
> Happy New Year and happy debugging!
> -- 
> Maxim Dounin
> _______________________________________________
> nginx mailing list
> nginx at

Posted at Nginx Forum:,245904,246065#msg-246065

More information about the nginx mailing list