Archived Forum Post

Index of archived forum posts

Question:

DNS Caching?

May 06 '14 at 11:09

Do objects like CkHttp do DNS caching? If so, is there any way of clearing the cache?

Our software uses CkHttp to get data using HTTP, and a week ago, we changed the IP address which the hostname resolved to. The TTL on the DNS A record was only 1 hour, but we are still getting some HTTP requests to the old IP address (a week later). Most HTTP requests are going to the new address, and I've done several tests to check the DNS has correctly changed.

So, my next guess is that CkHttp has cached the DNS entry, and is not honouring the DNS TTL, and if the software hasn't been restarted, then it is still accessing the old IP address. If this is the case, then we'd like to periodically flush the DNS cache in the next release, so that we don't get this problem again.

I can't see any obvious functions to flush the DNS cache.

Any ideas?


Answer

Well, we need the VC++ 12.0 x86 (Platform Toolset v120_xp) version, but if it's going to be on the website within the next month or so, we can just wait for that.

(I'm mostly just glad I now know what was happening ;-) )


Answer

I have implemented a scheduled task to run the ifconfig with the /FLUSHDNS option, but am not real sure that it works.

We have one client that has issues on their server from time to time. After the initial hit, we move the process to another server where a service wakes up 24x7 each 30 minutes and tries again.

It possibly could be something in the chilkat software. This is the SFTP connect.


Answer

A solution is available in v9.5.0.38.

See http://www.cknotes.com/v9-5-0-38-micro-update-trustedroots-objectclass-added-and-other-various-fixes/

Please tell me exactly what build you would need (programming language, operating system, VC++ version, .NET version, Perl version, etc. ) so that I can provide the update..