Forum Discussion
What is the Table variable data range?
While running our iRule, I am getting exception "Illegal value (line 1) invoked from within "table incr -subtable $tbl "AccumulatedResponseTime" $currentResponseTime"", which seems to suggest variable "AccumulatedResponseTime" value is out of range. It could happen if our external service failed to reset it. I would like to handle this exception more gracefully, but I couldn't find any information regarding variable data range. I am new to iRule, can someone please shed some light on this?
2 Replies
- Kevin_Stewart
Employee
According to the wiki, table incr takes two options beyond the subtable name: the key and the delta. So in the above statement, the "AccumulatedResponseTime" string would be the key - an arbitrary string value, and $currentResponseTime would be the delta - or amount to increment by. Without the delta the (numeric) table entry would be incremented by 1. If the table entry didn't exist, the key would be created with a value of 0. Is it possible then that $currentResponseTime is not a number?
You could, at the very least, encapsulate all of this in a catch statement:
http://www.tcl.tk/man/tcl8.4/TclCmd/catch.htm
Or verify that the delta value is a number before using it.
- Kevin_Stewart
Employee
Interestingly, there actually may be a limit. I just tested on an 11.3 VE and the largest integer value seemed to be in the range of:
9,999,999,999,999,999,999 (commas added for readability)You can check this value by logging it in the iRule:
log local0. [table lookup -subtable $tbl "AccumulatedResponseTime"]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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