This is a discussion on Re: Apache, DNS and mod_proxy - timeouts, slow dns lookups within the Linux Web Servers forums, part of the Web Server and Related Forums category; > The DNS entry for web.xyz.com is used for failover purposes, so the IP > address changes on ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> The DNS entry for web.xyz.com is used for failover purposes, so the IP
> address changes on the fly. But it seems that for around 10 minutes > mod_proxy continues to return data from the box in the old > configuration. What it seems to be doing is caching the IP address in > memory, so it doesn't do a DNS lookup for every request, which makes > sends. But 10 minutes is too long. Is it possible to force > Apache/mod_perl to redo the lookup at any given time (short of stopping > and starting the server), or perhaps setting the DNS lookup to happen a > litle more frequently, allowing us to tweak it to find an ideal value? > > I'd surea appreciate you help on this. I'll recompile if it's a source > change it needs. the caching of dns replies is a feature of your systems resolver libraries and not apache or its modules. therefore recompiling apache probably won't help. what you can try however, is to use dns for what it is supposed: there is a field called TTL (time-to-live) in dns records, which gives the time in seconds a client shall cache the result at max. a zero value means no caching at all and re-resolving anew for each request. so try zero ttl or some seconds instead of minutes... > > Second question... > > When the content server behind the surrogate doesn't respond, it takes a > long time for mod_proxy to time out and give an error message. Under > heavy load, this causes Apache to max out the number of children it's > allowed to spawn and errors start to happen. It there a way to tweak > mod_proxy's timeout? I understand that Apache 2.0 will have a parameter > for this but alas we're not using it - waiting until the production > version of mod_perl to come out. afaik not. maybe hacking mod_proxy might help here - good luck with that... joachim |