Ab – Apache Bench hanging with -k Keep-Alive switch

November 25th, 2009

This problem was making me go blind! I’m testing Spinneret with ab at the moment, trying to make sure there’s no disastrous behaviour under load. I found that ab just stopped after the first request if I used the -k switch. I’m not sure the problem is my fault, exactly, but I have ‘solved’ it. HTTP 1.0 didn’t have persistent connections. In HTTP 1.1, the default behaviour is persistence, so only a mechanism for explicitly closing a connection is provided.

My Spider

My Spider

Apache bench offers the ‘-k’ switch to allow you to test your webserver with persistent connections, but sends a HTTP/1.0 request. The -k switch causes ab to send the header “Connection: Keep-Alive” to the server. Spinneret’s debugging log confirmed a response was sent back, and the ‘-v’ switch (verbose) in ab would even show that it received the response, but it would just ‘hang’ at that point, until it timed out:

LOG: Response code = 200
apr_poll: The timeout specified has expired (70007)

I wasted a lot of time imagining what could be wrong with it before I decided to just duplicate the response from an Apache server that worked with the -k switch in ab. I spotted that Apache was returning the ‘Connection: Keep-Alive’ header. Adding that header field to a Spinneret response to a HTTP/1.0 request that contains it solves the problem with ab.

This behaviour isn’t specified anywhere, but it is suggested in an Internet Draft for HTTP/1.1 at w3.org:

The Connection header field with a keep-alive keyword must be sent on all requests and responses that wish to continue the persistence.

Perhaps the nice people at Apache might consider some less baffling behaviour for when amateur webserver programmers attempt to pick up their tools!

Streamyx down AGAIN! Up and down like a bride’s nightie!

November 25th, 2009

What is a frustrated Internet user to do? I’m not sure if I can even be bothered to send email this time. No, not true. I have to. Streamyx has disappeared again 16:15 Wednesday 25th November. Fortunately I still have my DiGi EDGE adapter. Hey! No sooner did I start writing than it was back again. 16:30, so about 15 minutes.

DiGi

DiGi

What is it that goes through TM’s mind? “Nobody will notice 15 minutes…”? Maybe next time I see one of their vans by the side of the road, I should just jump into it and take it for a joy-ride for 15 minutes! Would it be okay? 12 hours? 2 days? Of course it’s not okay! The only reason TM can treat their customers like this is because it’s a government monopoly!

OK, just a quick one this time. We are busy, just wanted to vent at the sudden ‘Act of God’ that cut us off in the last hour of the working day. Thanks TM.

Hey! Was just about to post this and switch our home network back to Streamyx when the light went off on the ADSL modem. We’ve been cut off! OK… phone is back at 16:40, got an IP address again at 16:43… I’d better post this, just close my eyes and get back to work on DiGi. It’s so disruptive.

Sean

x

Update 1 – Saw the TM guys at the cabinets on the way to pick up my daughter from kindergarten. “Lightning” they said. “But it happens dozens of times a year!” I said, thinking “Lightning never strikes twice”. “Ya, always like that wan” he said. I ran out of things to say at that point, so I left, because I would look stupid standing there with my mouth open, but nothing coming out.

Update 2 – Got a phone call and an email after dinner. “It’s working now, isn’t it?” they said. I did try suggesting they phone or email before they do scheduled maintenance, but you have to respect the professionalism of the TM Support staff: they are impervious to unscripted communication.

Streamyx down again. Double disaster: Fairil resigned!

November 24th, 2009

Streamyx died between 17:30 and 19:30 yesterday (Monday) evening. I sent an email to help@tm.net.my. We decided it wasn’t fair to phone Fairil outside of office hours. We have DiGi EDGE – which appears to be 100% reliable – so we no longer have to lie on the floor screaming and crying when Streamyx dies. If you’re not from Malaysia and wondering how I can be so calm about Streamyx’s diabolical performance, well… you would have to live here to know. Complaining is illegal here, so if it all looks like harmony – that’s the law at work.

DiGi

DiGi

We phoned Fairil this morning, but the number is no longer in service. Jess phoned the local TM exchange, and finally found someone who said Fairil has resigned. Resigned! Now who are we going to call? The person Jess spoke to seemed to be more like the TM we know, and was non-committal about the problem. They said they would look into it, and didn’t ask us to try unplugging our modem – which is pretty good, on balance, for TM.

It’s just not Fairil though – he always told us straight away that there was a problem (allowing us to be confident that at least someone who could fix the problem was aware of it) and didn’t waste any more of our time. We miss Fairil! We hope he has changed employment to something that will reward him for being honest and giving people what they’re paying for. Good luck Fairil!

Update – Streamyx available again around 13:30 on Tuesday.

Streamyx down Port Dickson / Lukut. Ask Fairil.

November 13th, 2009
DiGi

DiGi

I’m a lot more cheerful this time. Got my desk organised so that the network with our home machines on is easier to swap from Streamyx to DiGi when TM do their frequent best to stop me getting any work done.

Also, a major time-saver, I’ve found our local Streamyx man – “Fairil” – who answers his phone straight away, and tells me what’s wrong straight away. A few days ago it was:

“Hello, Fairil?”

“Lightning.”

“Thanks.”

Today it is:

“Hello?”

“Power supply trip.”

“Ta. Seeya.”

You see? Brilliant! Why waste hours on the phone to TM ‘Support’, while they try to blame you for the same problems they cause you every few weeks, when you can phone someone like Fairil, who’ll just save you time and effort by giving you the answer you need? The obvious answer is that now I haven’t made an ‘official’ call to TM, so there’s no support number, so there’s no body of evidence for the MCMC to assess their performance. Yeah right, like anyone believes that really happens.

That’s all I have for you today. If you’re trying to get some work done on the Internet, and you use TM’s Streamyx because wired Internet is obviously the sensible choice, then you have my sympathy. You’re not alone. There are others just like you, staggering around their offices, tearing their hair out, clutching their spasmodic hearts and with that swollen feeling in the head that must be a bit like having a brain haemorrhage.

I hope you’re reading this the same way I’m writing it. Just downgrade your Streamyx plan to the bare minimum and use the money you save on their lousy service to pay for a DiGi EDGE adapter and DiGi mobile broadband. It’s slow, but always works. You see? I’m getting work done even though TM are trying to stop me. Good ah?

– Update: service restored between 10am and mid-day Saturday 14th

-Update2: gone again early evening (6ish?) Saturday 14th. It’s now 10pm (had guests), so feels a bit late to phone Fairil. Counting the blessings from DiGi again!

-Update3: emailed latest outage to help@tm at ten o’clock on Saturday night. Just had a phone call with an offer to ‘reset port’, at seven thirty on Sunday night. Same problem – according to my D-Link router – ‘Timeout waiting for PADO packets’. Got to send email now that I agreed to. They suggested I should phone, but with a few years of exactly the same error every month or so, the wait for the helpdesk that can never actually help is just a bit too much.

-Update4: on DiGi for a few days this time – Streamyx back again on Wednesday. I understand there’s some sort of arrangement where you can claim back a few ringgit if your line is dead for more than a certain amount of time. I can’t be arsed looking for it. The time I lose to TM’s abysmal service is worth far more than that.

Ubuntu update problem: Failed to fetch … The HTTP server sent an invalid reply header

November 10th, 2009
Ubuntu update problem - The HTTP server sent an invalid reply header

Ubuntu update problem - The HTTP server sent an invalid reply header

So you’re happily upgrading from Jaunty Jackalope to Karmic Kipper and there’s a network problem. A brief, normally completely recoverable network hiccup. Update-manager complains that it was interrupted, and quits. Thinking nothing of it, you start it again, and nothing works! The error messages are warnings like “W:Failed to fetch…” a few times, and then a last “E:Some index files failed to download…”.

I got confused by the files all having names like “Translation-en_GB.bz2”. I think this could problem could possibly be caused by having a transparent proxy cache between my PCs and the network. I’m wondering if there’s some issue with 404s / 304s being received by apt, or whatever it is that’s actually doing the HTTP work.

What fixed this problem for me was changing my repository in Synaptic to a different one, reloading the package lists, then changing back again to the original repository and reloading the package lists again. I don’t want to change repository because my Ubuntu PCs are all behind a proxy cache, which makes updates very much faster! I imagine the problem can be caused by any network problem – I had two today, one courtesy of my ISP, one courtesy of failing ethernet ports on an old router.

I couldn’t find anything with searching online that directly addressed this problem, though I found a few pages where people said they had the same problem. I hope you find this page quicker than I found the solution!