Forum Discussion
engtmk
Nimbostratus
Dec 27, 2007bigip1 panic: unable to alloc 4194304 bytes
I found this error in my LTM log, when I asked the support he said:
that TCL was trying to resize the ::users array (internal hash table) with an index of "time,200.35.63.129", and it crosse...
hoolio
Cirrostratus
Dec 27, 2007You're using two array entries for each client IP: "$::users(nb,IP)" and "$::users(time,IP)". I think you could combine these to $::users(IP) = "count:timer" to save some memory.
For example, to insert a new client into the array, you could use:
set ::users($clientip) "1:$now"
To check if the client exists in the array, you could use:
if { [info exists ::users($clientip)] } {
To get the count, you could use:
getfield $::users($clientip) : 1
To increment the count, you could use:
set ::users($clientip) [incr [getfield $::users($clientip) : 1]]:$now
And to get the timeout, you could use:
if { [expr { $now - [getfield $::users($clientip) : 2] } ] > $::blocktime } {
Aaron
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
