Forum Discussion
ingard
Jan 25, 2016Nimbostratus
irule to log slow and/or tcp profile timed out requests to backend
Hi
I'm trying to identify which requests are causing our backends to stop responding/hang/fail.
I was thinking some sort of timer and/or catch the tcp timeout rst maybe? I've been trying to figu...
Hi Ingard,
of course, you can also include other events and/or other variables to the log output.
Here is a quick sample using the LB_SELECTED event to include the [LB::server addr] of the selected pool member...
when RULE_INIT {
set static::timeout 10000 ; msec
}
when LB_SELECTED {
set debug(request_url) "[HTTP::host][HTTP::uri]"
set debug(server_addr) "[LB::server addr]"
set debug(id) [after $static::timeout {
log local0.warn "$static::timeout msec timeout reached on Node \"$debug(server_addr)\" for \"$debug(request_url)\""
}]
}
when HTTP_RESPONSE {
after cancel $debug(id)
unset -nocomplain debug
}
when CLIENT_CLOSED {
if { [info exist debug(request_url)] } then {
log local0.warn "Connection closed without HTTP response on Node \"$debug(server_addr)\" for \"$debug(request_url)\""
}
}
Cheers, Kai
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