> Just to be clear - we are not explicitly using namespaces anywhere in our > scripts. We are just "set"-ing local variables, e.g.: >
Of course not. But last time I checked (admitedly a long time ago, in an older 3.x version of AOLserver), local variables still hung around in the connection thread where they were created, even after the connection was closed. In other words, if you did "set foo bar" on a page being serviced by thread conn1, the next time you used conn1, variable foo would still be there.
I'm not sure when or where the Tcl garbage collector might come into play, but since you did "set foo" in the top level presumably foo will never go out of scope and be garbage collected until the thread is destroyed.
I believe this code is called at every connection close to clear up the interpeters TLS.
_ns_cleanupinterp autoclose
foreach g [info globals] {
if {![string match tcl* $g]
&& ![string match error* $g]
&& [string compare env $g] != 0} {
upvar #0 $g gv
if [info exists gv] {
unset gv
}
}
}
if $autoclose {
foreach f [ns_getchannels] {
if {![string match std* $f]} {
catch {close $f}
}
}
}
Now if you are naming variable that begin with tcl, error, or info you may be in trouble since the gc will bypass freeing that memory.
I am curious how many variables you are setting in the pages. AOLserver uses a "high water mark" memory allocator that once it is out of space will request another block of memory twice as large as the last one it had to request. This makes it very fast and while the variables are freed from the stack the memory has still been allocated and is not released but reused. It is possible that you are allocating very large chunks of memory so that it doesn't find a big enough chunk available when attempting to set new variable? How many variables are you setting (avg, max) per page?
Best Regards, Carl Garland
_________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
-- AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
