
Firefox seems to be ignoring DNS TTL and cache resolved DNS indefinitely
Hi,
Since we started serving our js and css through CloudFront a few weeks ago, we started seeing a problem with Firefox, where those assets sometimes wouldn't load.
So far, the only way I was able to reproduce the issue was to load our homepage in the afternoon, not closing my browser and then refreshing the page the next morning. I know this is rather extreme, but some of our clients reported this issue which means that it happens in real life scenarios as well. We were able to reproduce it on Windows and OSX from our office in NYC and Krakow, Poland.
I used Firebug to track this problem down and it looks like Firefox is ignoring the TTL on DNS requests when looking up urls and caches them almost indefinitely. Due to the constant rotation of the CloudFront servers, after enough time the server at the cached IP stops responding and all requests are being dropped (aborted requests on the screenshots). Does this sound like a plausible explanation? Did anyone have the same issue and has a solution for it?
Screenshot taken on 2013-06-13 at 10:29:30 PM shows the page loaded successfully, then one taken on 2013-06-14 at 9:33:30 AM shows the firebug 'Net' tab with all the asset requests aborted. Force-refreshing the page a few times helps, as shown on the screenshot from 9:34:03 AM.
https://s3.amazonaws.com/fpfonts/Screen+Shot+2013-06-13+at+10.29.30+PM.png https://s3.amazonaws.com/fpfonts/Screen+Shot+2013-06-13+at+11.31.23+AM.png https://s3.amazonaws.com/fpfonts/Screen+Shot+2013-06-14+at+9.33.30+AM.png https://s3.amazonaws.com/fpfonts/Screen+Shot+2013-06-14+at+9.34.03+AM.png
The page we are currently debugging this on is http://preprod.freshpair.com/ (awsforums:awsforums) but I encountered this on other sites as well.
Dig results at a the time of the first page view:
dig dfndz4rv44deo.cloudfront.net
- <<>> DiG 9.7.6-P1 <<>> dfndz4rv44deo.cloudfront.net
- global options: +cmd
- Got answer:
- ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16168
- flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0
- QUESTION SECTION:
- ANSWER SECTION:
dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.137 dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.56 dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.166 dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.49 dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.116 dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.223 dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.164 dfndz4rv44deo.cloudfront.net. 48 IN A 54.240.162.245
- Query time: 16 msec
- SERVER: 192.168.0.69#53(192.168.0.69)
- WHEN: Thu Jun 13 22:29:11 2013
- MSG SIZE rcvd: 174
And then the next day:
dig dfndz4rv44deo.cloudfront.net
- <<>> DiG 9.7.6-P1 <<>> dfndz4rv44deo.cloudfront.net
- global options: +cmd
- Got answer:
- ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40362
- flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0
- QUESTION SECTION:
- ANSWER SECTION:
dfndz4rv44deo.cloudfront.net. 60 IN A 216.137.61.248 dfndz4rv44deo.cloudfront.net. 60 IN A 54.230.94.74 dfndz4rv44deo.cloudfront.net. 60 IN A 54.230.92.193 dfndz4rv44deo.cloudfront.net. 60 IN A 216.137.61.238 dfndz4rv44deo.cloudfront.net. 60 IN A 54.230.95.250 dfndz4rv44deo.cloudfront.net. 60 IN A 216.137.61.145 dfndz4rv44deo.cloudfront.net. 60 IN A 216.137.61.253 dfndz4rv44deo.cloudfront.net. 60 IN A 216.137.61.105
- Query time: 183 msec
- SERVER: 10.94.2.100#53(10.94.2.100)
- WHEN: Fri Jun 14 09:33:15 2013
- MSG SIZE rcvd: 174
Modified
Chosen solution
Thanks khozlov!
Read this answer in context 👍 0All Replies (6)
Hello,
I am so sorry that Firefox is giving you this issue. The developers don't usually check this forum, so could you please file a bug on Bugzilla? We will resolve this as soon as possible!
Note: When filing a bug, please follow our Bug Writing Guidelines. Thanks!
Someone here may try to assist you but you may do better asking on the mozillazine forums, possibly:
Thanks iNerd and John. I also posted this bug on AWS support forums and the issue has been solved on their end.
Glad to know the problem is solved.
Would you care to share a link to one of the solutions.
Here is the link to the AWS Forums thread (https://forums.aws.amazon.com/message.jspa?messageID=465414)
Modified
Chosen Solution
Thanks khozlov!