Forum Discussion
How to capture this message "Connection Interrupted"
Hi All,
I'm new in this kind of technology (F5-IRule), may be this is a very basic question ... I'm sorry about that, but I have a problem that I could not resolve.
I have changed the IP:idle_timeout parameter using this small IRule code ...
when HTTP_REQUEST {
IP::idle_timeout 10
...
...
Everything works ok, but the after 10 seconds I receive in my web browser the following error message:
"Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again."
Is there any way using an IRule to capture the timeout/Interrupted error and redirect to a maintenance page ?
Many thanks.
- Mohamed_Lrhazi
Altocumulus
Why are you using IP::idle_timeout? It might be helpful to explain what you are doing, what problem is it solving? - roldancer_11066
Nimbostratus
Hi Mohamed, - Mohamed_Lrhazi
Altocumulus
OK. I believe your question is not basic then. Maybe someone will point you to something better, maybe simpler, but you could start playing with the example here: - What_Lies_Bene1
Cirrostratus
I'd suggest it would be easier to create a custom TCP Profile with a low idle timeout and assign it to the Virtual Server: Protocol Profile (Server). This will maintain the default timeout of 300s on the client side (assuming a standard VS and the default tcp profile) but allow you to reduce the server side idle timeout, without causing errors on the client. - Richard__HarlanHistoric F5 AccountYou can not capture the error as it is the ltm that is sending a reset to the client. The Client browser is the one displaying the error message. You could play with the iRule after command, just a thought but if you do a after 10000 then send a HTTP::response to the maint page.
- roldancer_11066
Nimbostratus
Hi All, - Mohamed_Lrhazi
Altocumulus
You would need to not set the idle timeout, or at least set it up higher than what you need, then use an iRule to track every connection and measure its idleness! and do whatever you want with it when it has been idle for too long. - Mohamed_Lrhazi
Altocumulus
The bigger problem I think is what would you do once the event happened? Can you just send an HTTP redirect? what is the client is not expecting HTTP redirects.. what if it is waiting for JSON? - What_Lies_Bene1
Cirrostratus
Do you remove the iRule when you tested with the shorter client side timeout? If not, please do so and test. - Kevin_Stewart
Employee
I may not be completely clear on your objective, but you said that you don't want long running requests. HTTP traffic, by default, is fairly transient and I believe the typical TCP idle timeout is somewhere around 3-5 seconds. So i'm guessing you're talking about requests that include some amount of traffic that exceeds a given threshold (file upload, Ajax comet, etc.) I think in this case you could set an after timer at the beginning of each HTTP request, and then unset it in the response event. Then you could trigger an HTTP redirect or response if the timer expires. That may also trigger the timer if the response takes too long. And it wouldn't prohibit a lot of small requests.
Recent Discussions
Related Content
* 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