From: David G. <dav...@in...> - 2001-02-10 03:06:28
|
The exec leak on windows is ~4k per call from a TerminateThread() on the pipe reader thread. It got fixed in 8.4a2, and could be merged back down to 8.3.2, I guess. Either upgrade to 8.4a2 or rebuild 8.3.2 with tclWinPipe.c from 8.4a2 to solve the exec leak. There was also a fix put in the generic part of the pipe stuff regarding a couple un-freed Tcl_Objs, but I forget what it was exactly, but 8.4a2 has it. -- Dave ----- Original Message ----- From: "Brent Welch" <bre...@in...> To: "Derek McEachern" <de...@ti...> Cc: <davygrvy>; "Tclhttpd-Users (E-mail)" <tcl...@li...> Sent: Thursday, February 08, 2001 3:45 PM Subject: Re: [Tclhttpd-users] Memory Usage & cgi's > Whatever is in your CGI script will have no affect - that's > a different process. You might try looking at > /status/size > which returns the number of bytes used for data and code at the > Tcl script level. It won't highlight any leaks in the C core, > but there shouldn't be many of those. Hmm - there is some possibility > of a leak in exec on Windows - but I thought that was only in certain > cases - I'll have to check on that. > > >>>"Derek McEachern" said: > > All, > > > > I'm having a curious problem and I'm not sure what I > > can do about it. Here's my setup: - > > > > Windows NT running tclhttpd3.2.0. > > > > Almost all my page access are tclsh cgi scripts which > > have to do some kind of interaction with a mysql > > database. > > > > It appears that something in this whole setup is gobbling > > up memory that I don't recover until I kill tclhttpd. I've > > been trying to figure out where the problem lies and I'm > > not making much progress. > > > > First, I have a load of errors in the log80_error file > > which look like so: > > > > [08/Feb/2001:15:49:12] nosock bgerror {Thu Feb 08 15:49:12 Central Standard > > Time 2001 > > can't unset "data": no such variable > > while executing > > "unset data" > > (procedure "HttpdCloseFinal" line 14) > > invoked from within > > "HttpdCloseFinal $sock" > > (procedure "Httpd_SockClose" line 44) > > invoked from within > > "Httpd_SockClose sock3920 1 timeout" > > ("after" script)} > > > > I haven't got down to the root cause of this but I'm assuming that > > this isn't good. > > > > The other thing I'm wondering about is the "code" of my > > cgi's. They all look something like > > > > #!/bin/sh > > # \ > > exec tclsh "$0" ${1+"$0"} > > > > if {[catch { > > package require ncgi > > lappend auto_path [pwd] > > set vars [ncgi::parse] > > #--cgi code here > > exit 0 > > }]} { > > #--Catch Errors > > puts "Content-Type: text/html\n" > > puts "<PRE>$errorInfo</PRE>" > > exit 0 > > } > > > > Reaching for straws now I wonder if it has anything to do > > with "exiting" though I don't know why.. > > > > Any thoughts/ideas would be greatly appreciated. > > > > Derek > > > > > > _______________________________________________ > > TclHttpd-users mailing list > > Tcl...@li... > > http://lists.sourceforge.net/lists/listinfo/tclhttpd-users > > -- Brent Welch <bre...@in...> > http://www.interwoven.com > |