Forum Discussion
mahnsc
Nimbostratus
Jan 13, 2009Selectively Disabling Keep-Alives
This is probably going to be another odd-ball post but there is a good reason for it.
We have a site with a recently discovered bug that sends our app servers into full garbage collection mode for very, very long periods of time when specific customer conditions are met. While reproducing the problem and upon further investigation, we've learned that after a period of 5 minutes (and Yes, people seem to be waiting that long on this site for a response), the bigip issues a connection reset and then the browser retransmits the POST. 5 minutes later, another reset followed by in some cases, another retransmit. This appears to be standard browser behavior.
I don't want to disable keep-alives wholesale--I am wondering if there is a way to disable keep-alives on POSTs using an irule? But I'm more concerned whether this is something I should not even think about attempting.
- hoolio
Cirrostratus
I thought most browsers would show 'page cannot be displayed' or some other error when they receive a RST. I don't think there is an automatic retry. - mahnsc
Nimbostratus
I've only been able to so far find two links that describe the same symptom--however I'm seeing it not only in IE6 but IE7 and Firefox 3.0.5: - hoolio
Cirrostratus
What web/app servers are you using? Are you load balancing the client to web connections as well as the web to app connections using two separate VIPs? - mahnsc
Nimbostratus
BigIP>>Two Apache Servers >> mod_jk >> 5 JBoss Application Servers - mahnsc
Nimbostratus
If this helps out at all, I've gleaned this from the rfc for http 1.1: - mahnsc
Nimbostratus
So the subject of this post should probably be renamed to "Selectively Disabling Retransmissions" - hoolio
Cirrostratus
Interesting... I hadn't read that part of the RFC before. I'm surprised that neither HttpFox or Fiddler would show the retry. Are you running tcpdump on the client or LTM? Do you see the retried request on the client VLAN? If you run tcpdump on the client using a tool like Wireshark, do you actually see the request being sent from the client?http://devcentral.f5.com/wiki/default.aspx/iRules/ip__idle_timeout when HTTP_REQUEST { if {$some_condition == 1}{ log local0. "original timeout: [IP::idle_timeout]" IP::idle_timeout 1801 log local0. "updated timeout: [IP::idle_timeout]" } } when SERVER_CONNECTED { log local0. "original timeout: [IP::idle_timeout]" if {$update_serverside_idle_timeout}{ IP::idle_timeout 1802 log local0. "updated timeout: [IP::idle_timeout]" } }
- mahnsc
Nimbostratus
tcpdump was run on the LTM. we were sniffing traffic between "everything" and the LTM as well as traffic between the LTM and the web servers. "Everything" is in quotes because we were testing against an identically configured stack as our production site. (Same LTM. Different web servers and app servers--although the servers in the lab are a bit beefier than production. We have a swing environment set up of two identical silos of servers. Identical numbers of web servers, app servers, database servers, etc. and we use shell scripts on the LTM to detach and attach pools to point traffic to a particular silo but that's another long story) - mahnsc
Nimbostratus
Oh, one other thing. Since we're seeing the browser retransmit these POSTs after a period of time, we're thinking that the retransmission of these is hastening the demise of the site. Not the root cause but if you have several hundred users retransmitting every 5 minutes, we're running out of threads faster than we can assemble the right people on a call to deal with it. - hoolio
Cirrostratus
Do you have any way to differentiate between the initial request and the second request? I suppose you could track POST requests by client IP and maybe user-agent plus the URI using the session table. You could remove the session table entry for that client if/when the response is received. If the client already has an unanswered request pending and sends another one from the same IP with the same user-agent to the same URI, you could send back a 503 or some other response. You would want to set a timeout when adding the session table entry to that the client would be able to make another request after the timeout expired.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects