# Resolver timeout error at moderate load

**URL:** <https://www.ruby-forum.com/t/resolver-timeout-error-at-moderate-load/185702>\
**Category:** NGINX\
**Created:** [March 24, 2010, 8:08pm UTC](https://www.ruby-forum.com/t/resolver-timeout-error-at-moderate-load/185702 "2010-03-24T20:08:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vys](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/4bbf92/32.png) [@vys](https://www.ruby-forum.com/u/vys)\
**Post date:** [March 24, 2010, 8:08pm UTC](https://www.ruby-forum.com/t/resolver-timeout-error-at-moderate-load/185702/1 "2010-03-24T20:08:12Z")

</div>

Hi,  
I’m testing performance of nginx as reverse proxy where it selects the  
upstream server by composing a dns name based on the incoming request’s  
host  
header. For example if the request is for [username.domain.com/images](http://username.domain.com/images),  
the  
upstream server is username-images.internal. This  
username-images.internal  
is looked up in a internal dns server which is configured using the  
resolver  
directive.

When I hit nginx with requests that use about 30000 different hostnames  
using http\_load tool with 1600 parallel requests, I see this error:

2010/03/24 15:12:50 [error] 11650#0: \*2260409  
user12-images.nginxtest.comcould not be resolved (110: Operation timed  
out), client: 10.10.65.221,  
server: \*.nginxtest.com, request: “GET /10kb HTTP/1.0”, host: "  
[user12.nginxtest.com](http://user12.nginxtest.com)"

I’ve tried with resolver\_timeout from 1 second to 10 seconds. This error  
doesn’t happen with lesser number of dns record set (like 100 different  
usernames). But happens consistently with 30k users. I’m sure there is  
no  
issues with the dns server itself because I’ve run dnsperf on the dns  
server  
and it can do 20000 queries/second with max time being less than a  
second.

Also, isn’t nginx supposed to cache the dns records for 300 seconds?

Any help in resolving this issue is greatly appreciated.

Thanks,  
Vinay
