Daily Archives: May 6, 2008

Debian / Ubuntu very slow to resolve DNS (slow DNS resolution or lookup)

I had this problem the other day: two websites using identical code to collect RSS news feeds from identical sources. Website A loads its pages in about a second, whereas Website B takes up to 10 seconds. Go figure.

After I had thought about the problem for a while, and checked the codebase was identical, I decided the problem must be due to the server. Website A runs on a Red Hat Fedora machine, whereas Website B runs on a Debian server. It finally dawned on me that the server has to resolve the DNS for each RSS feed address, and I concluded (incorrectly) that as the two servers are on different networks, there must be a problem with name servers on the network. I tried swapping the name servers around in my network configuration, and even trying different servers – all to no avail.

A bit of Googling finally revealed that Debian switches on IPv6 by default, and then uses this before it uses IPv4 for DNS resolution. This problem won’t just be affecting servers, it will affect anyone using a Debian linux distribution, and this includes the very popular Ubuntu. So if you have slow website response on websites with external sources, or you are fed up with sitting waiting for your browser to resolve each address you type in, here is the solution:

There is a configuration file called “aliases” here: /etc/modprobe.d/aliases

In there you will find a line like this: alias net-pf-10 ipv6

Change it to: alias net-pf-10 off ipv6

Reboot the machine. If you are running a server with BIND, double check that your BIND server has come back online.

Done.

What I don’t understand, is why Debian should default to this configuration. IPv6 is a while away from widespread use, so why not at least provide an option in the install script for the OS so the user can make their own choice?

eBay – it’s a seller’s market

It’s about time I had another rant about eBay. It still amazes me that people put up with their crap, and here’s my latest experience:

I’ve been looking to buy a motorcycle. I found something local and perfect for my needs on eBay. I messaged the seller, looked at the merchandise, made my bid. The auction was due to finish today and I was the high bidder – yippee. I had the cash ready and I had agreed delivery terms with seller should I win the auction. But lo and behold, when I logged in this morning, no trace of my bid whatsoever in the My eBay screen. So, I checked my email and it turns out my bid was cancelled because “the item is no longer for sale”. Presumably the seller did a behind the scenes deal with another eBay punter. So, I am back to square one.

Had I, the buyer, failed to meet my obligations, I would receive an eBay strike and negative feedback. But it would seem the seller can do whatever the hell he or she wishes. I can’t think of an auction house anywhere where bidding would be stopped because the seller got a better offer elsewhere, so why should this be the case with online auctions?

eBay have this big graphic on their home page at the moment: “Your pound goes further with eBay”. Rubbish! If you do manage to successfully purchase something, beating all the last minute bid snipers, and without being conned in the process by one of the many crooks operating on eBay, chances are you will have paid over the odds for your item. There are very few bargains on eBay, except in the busiest categories.

I could write a better auction website in my sleep. The problem is getting people to use it. Will the sellers come if there are no buyers? Will the buyers come if there are no sellers?

So we’re stuck with eBay then? Not at all! I think I’ll go and quietly scour the classifieds in the local press and see what I can find – I bet I get a better deal that way anyway.