Yep- that's repeatable in Aolserver 4, beta20 as well. We're going to
take a look into this.

In the meantime, in case this helps your situation, I was able to avoid
the memory growth by first issuing a

set temp [ list ]
before executing the lappend loop

-Elizabeth Thomas
America Online, Inc.

Bernhard van Woerden wrote on 10/28/03, 6:39 AM:

 > If I run the following script:
 >
 > for {set i 0} {$i<100000} {incr i} {
 > lappend temp [list one two three four five six seven eight nine]
 > }
 > ns_return 200 text/plain [string bytelength $temp]
 >
 > memory usage soars but is not reclaimed by Aolserver.
 >
 > I've tested this on Aolserver3.5.6 TCL 8.4.3 and Aolserver4 beta 10 TCL
 > 8.4.4
 > Platform:FreeBSD 5.1-RELEASE
 >
 > top shows
 > PID   USERNAME PRI NICE   SIZE    RES  STATE   TIME   WCPU    CPU COMMAND
 > 67566 nsadmin    2   0   35656K 32996K poll    8:16   0.00%  0.00% nsd
 >
 > If I restart nsd and change the script to use append instead of lappend
 > Aolserver reclaimes memory and the nsd process shrinks after execution.
 > The same is true if the list is not nested.
 >
 > I thought this might be a problem with TCL but when I run the following
 > script from a shell, memory is reclaimed after the variable was unset.
 >
 > for {set i 0} {$i<100000} {incr i} {
 >     append temp [list one two three four five six seven eight nine ten]
 > }
 > puts [string bytelength $temp]
 > after 10000
 > unset temp
 > puts Unset
 > after 10000
 > puts Exit
 >
 > I have one production server that has to be restarted every few weeks
 > because memory consumption slowly grows. I would be grateful if anyone
 > could tell me whether they can reproduce the problem or suggest a
 > solution.
 >
 > Many thanks
 >
 > Bernhard van Woerden
 >
 >
 > --
 > 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.


--
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.

Reply via email to