Forum Discussion
Richard__Harlan
Feb 10, 2006Historic F5 Account
Possable Rule crashing Unit
First off I opened a case with support. Just was hope one of the iRules export would see a problem with the rule. If seem every time we have user testing there site witch has these rule attach to it i...
Feb 10, 2006
Have you put any logging in place to determine which part of your rules is the culprit. The one thing that sticks out at first glance is that you are using regsub to build an entire new copy of the payload which could be quite memory intensive depending on the size of your response. My guess is it's either the regsub or HTTP::payload replace but there's now way to know without some logging.
There are alternates to using regsub on the entire payload. You could use regexp with the "-indices" argument to return the indices in the source content, then call the HTTP::payload replace command for each index of matched content. This is illustrated in this post on my blog:http://devcentral.f5.com/weblogs/joe/archive/2005/07/27/1398.aspxClick here
The processing of the response data would look something like this:
when HTTP_RESPONSE_DATA {
set find "http://cfwctest3.deere.com"
set replace "https://cfwctest3.deere.com"
set offset 0
set diff [expr [string length $replace] - [string length $find]]
Get indices of all instances of find string in the payload
set indices [regexp -all -inline -nocase -indices $find [HTTP::payload]]
foreach idx $indices {
set start [expr [lindex $idx 0] + $offset]
set end [expr [lindex $idx 1] + $offset]
set len [expr {$end - $start + 1}]
replace the instance of find with the contents of replace
HTTP::payload replace $start $len $replace
modify offset if the replace string is larger or smaller
than find.
incr offset $diff
}
}But, unless the regsub or HTTP::payload replace commands are the culprit, this solution won't help you (aside from optimizing memory usage).
-Joe
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