On Thursday 26 June 2003 01:04, you wrote:
> Greetings,
>
> We have recently corrected a problem with random AOLserver crashes, and now

Was it somewhere in AOLserver code? If yes, do you mind opening
a bug report so we can fix that?

> we are seeing a different problem: ever-increasing memory usage by our
> primary application service between restarts.  Some of our application
> functions require fairly extensive string processing, which is currently
> handled by manipulating large local variables in memory.  As nearly as we
> can tell, none of this memory is ever freed after usage, even when page
> processing is completed.  If left unchecked, this eventually runs the
> webserver out of physical memory and paging begins...with predictably
> negative results.  We can work around the problem by restarting the
> services every few days, but that's what we were trying to avoid in the
> first place.
>
> :-)

I understand that by "manipulating large local variables in memory"
you mean variables local to the connection interpreter, not AOL shared
variables (arrays).
You could try "ns_atclose" to fire up scripts at the end of each connection.
There you can devise a custom garbage-collection scheme.
If the nature of data is such that it can be shared among threads, you can
try the nsv* interface, but this would require changes to your script code.

>
> Does anyone have any experience with this type of problem?  Is this
> expected behavior, or is there special handling required to reclaim process
> memory (e.g., using a trace filter to unset variables after processing is
> completed)?

See above.

>
> Also, is there any simple way to determine how much memory is allocated for
> a particular Tcl variable?  This would be helpful if we end up needing to
> optimize our existing code, and a quick look at the built-in Tcl functions
> and AOLserver API did not turn up anything that meets this need.
>

There is no way to do this, AFAIK.

Cheers,
Zoran


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