Forum Discussion
Wil_Schultz_101
Nimbostratus
Jul 30, 2007Reselect pool on status code 500 or above...
So we run some Tomcat servers, when we undeploy the server will send a 503 that states that the application is unavailable. I do have a check that looks for a static page every 5 seconds and fails at ...
sam_81897
Nimbostratus
Oct 05, 2011We are working with the below rule now, but we are getting some errors, but I am having trouble finding information about the error:
Oct 5 10:41:21 local/tmm err tmm[2617]: 011f0007:3: http_process_state_early_100continue - Invalid action EV_TCL_CLOSE during ST_HTTP
_EARLY_100CONTINUE (Server side: vip=*vipname* profile=*profile* pool=*pool*
when HTTP_REQUEST {
set my_url [HTTP::host][HTTP::uri]
log "Request for URL=$my_url received."
if { [HTTP::cookie BIGIP] contains "Redirect" } {
set retries [findstr [HTTP::cookie BIGIP] "Redirect_" 9 1]
} else {
set retries 0
}
}
This is the guts here, examine each HTTP response. If you get an HTTP 500 error do the following:
Check to ensure we have not tried too many times
force current node down
Select a new node from the current pool
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "5" && $retries < [active_members [LB::server pool]] } {
log "$my_url has generated a [HTTP::status]. Sending 307 for response."
incr retries
LB::down
HTTP::respond 307 Location "http://$my_url" Set-Cookie "BIGIP=Redirect_$retries" Connection "Close"
} elseif { [HTTP::status] starts_with "5" && $retries >= [active_members [LB::server pool]] } {
set retries 0
HTTP::respond 404 Set-Cookie "BIGIP=Not_Found" Connection "Close"
}
if { ($retries < [active_members [LB::server pool]] ) } {
incr retries
HTTP::retry $myhttprequest
log "500 error received. HTTP request $myurl has been retried to [LB::server addr]."
}
}
Mark the node down and select a new node on LB failure.
when LB_FAILED {
log "Failure of node=[LB::server addr] in pool=[LB::server pool]"
set mypool [LB::server pool]
LB::down
LB::mode rr
LB::reselect pool $mypool
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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