You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Sven <sv...@online.de> on 2012/01/16 11:08:05 UTC
Weird file mis-selection problem
Hello list-listeners,
at first thank you all for providing Rivet.
We have a weird problem and I hope you can help: The Tcl
interpreter/Rivet is selecting the wrong (sourced) file depending on a
previously executed request. If you have files with the same name but
within different directories it may happen that the wrong code is
executed if these files are sourced.
I don't know if Rivet or TCL is the reason for the problem. I've running
rivet 2.0.4 with Tcl 8.4.19 within Apache 2.2.17. RivetServerConf
CacheSize is already set to 0.
I've tried to simplify the problem as most as possible - I have two
different directories containing Tcl scripts:
* AAA/handleAAA.ttml
* AAA/include.ttml
* BBB/handleBBB.ttml
* BBB/include.ttml
handleBBB.ttml is simply sourcing the include.tcl
<?
source include.tcl
?>
Both include.tcl are putting some messages on stdout. Only
handleAAA.ttml has some procedures with some commands (it is the
remainder of a more comprehensive file):
<?
#hgetvars
set myVARS(aParam) XYZ
proc procA {} {
upvar myVARS(some_unused) some_unused_inner
set args {}
regsub astring $args globalvar_local args
}
proc procB { } {
upvar myVARS myVARS
set unused_param $myVARS(aParam)
source include.tcl
procA
}
procB
?>
(If you want I can provide you the complete code for all files.)
If there are multiple Apache instances listening on one port I loop
through it doing multiple requests, e.g.:
for i in {1..10} ; do wget -O- -q -S
"http://localhost/sventemp/AAA/handleAAA.ttml" ; done
for i in {1..10} ; do wget -O- -q -S
"http://localhost/sventemp/BBB/handleBBB.ttml" ; done
In the end I can see that there are some requests are processed as
expected, others not. This depends on which request was executed
previously by the specific instance.
The only way I've found to circumvent the faulty behavior is to set the
option "MaxRequestsPerChild 1".
Does anyone see other options?
What is the cause of this behavior? Is it a bug?
Your help is very much appreciated.
Sven
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org