Bugs item #415695, was opened at 2001-04-12 09:03
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=415695&group_id=3152
Category: Architecture: Win32-specific
Group: aolserver3_3_1
Status: Open
Resolution: Later
Priority: 5
Submitted By: Massimo Zanforlin (mzan)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Memory leak in exec command
Initial Comment:
There is a resource leak somewhere in the exec command.
If you do exec several times (e.g. to launch a cgi with
an external interpreter) you will find that the
allocated memory (in Task Manager) increases by about
4Kb each time, and nsd hangs when it reaches about 10Mb
of memory (on my PC).
Something similar happended with exec in tclsh with
versions earlier than 8.3.3
Try this:
* in nsd.tcl:
ns_section "ns/server/${servername}/module/nscgi"
ns_param Map "GET /*.cgi"
ns_param Map "POST /*.cgi"
ns_param Interps CGIinterps
ns_section "ns/interps/CGIinterps"
ns_param .cgi "c:/progra~1/tcl83/bin/tclsh83.exe"
* in htdocs, put the file test.cgi:
puts "Content type: text/plain\n"
puts "Ciao!"
* on a client machine, launch a script like this:
package require http
set cgi_url http://my-aol-server/test.cgi
set counter 0
while 1 {
set greetings [http::geturl $cgi_url]
puts "($counter) [http::data $greetings]"
http::cleanup $greetings
incr counter
}
----------------------------------------------------------------------
Comment By: Kris Rehberg (kriston)
Date: 2001-07-19 07:39
Message:
Logged In: YES
user_id=16427
exec is finicky in a multithreaded environment and problems
like this happen. We're open to suggestions.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=415695&group_id=3152