Hello!
On Sunday 08 March 2009 02:51:21 Gustaf Neumann wrote:
> Dear Alexey,
>
> below is a fix for the nsproxy problem that you reported.
> The problem comes from a different initialization semantics
> in Tcl 8.5, that hits the nsproxy binary. The added call
> should work with Tcl 8.4 as well; please report back
> such i can commit the fix to CVS.
Patch really did solve the problem. I did test AOL4.5.1+Tcl8.5.6 build on one
my low-loaded productions server by 4 hour now and this work. Thank you very
much!
But I did find a few additional problems:
1. Some queries to nsproxy processes may produce zombie:
[08/Mar/2009:04:40:30][16835.3054869392][-nsproxy:close-] Warning: [shell]:
process 16961 won't die - sending sig 15
[08/Mar/2009:04:40:30][16835.3054869392][-nsproxy:close-] Warning: [shell]:
process 16961 won't die - sending sig 9
[08/Mar/2009:04:40:30][16835.3054869392][-nsproxy:close-] Warning: zombie:
16961
$ ps aux|grep 16961
www-data 16961 0.0 0.0 0 0 ? Z 04:40 0:00 [nsproxy]
<defunct>
$ ps aux|grep nsproxy
www-data 13956 0.0 0.0 11628 1952 ? Sl Mar07 0:00
/usr/lib/aolserver4/bin/nsproxy shell shell-proxy-1 print_doc
/tmp/fileCG1rsX/doc.odt} h {exec abiword $filename -t pdf} errmsg??catch {exec
so ...}
www-data 16961 0.0 0.0 0 0 ? Z 04:40 0:00 [nsproxy]
<defunct>
www-data 17076 0.0 0.0 14316 2464 ? Sl 04:41 0:00
/usr/lib/aolserver4/bin/nsproxy shell shell-proxy-0 print_pdf
/tmp/filexUJQil/doc.odt} h {exec abiword $filename -t pdf} errmsg??catch {exec
so ...}
veter 17535 0.0 0.0 3908 736 pts/0 S+ 04:44 0:00 grep nsproxy
www-data 24669 0.0 0.0 0 0 ? Z Mar07 0:00 [nsproxy]
<defunct>
www-data 24834 0.0 0.0 11628 1952 ? Sl Mar07 0:00
/usr/lib/aolserver4/bin/nsproxy shell shell-proxy-0 print_pdf
/tmp/fileYqgllZ/doc.odt} h {exec abiword $filename -t pdf} errmsg??catch {exec
so ...}
The problem is exists as for tcl8.5 as tcl8.4 builds of AOL+nsproxy.
2. Proxy processes have infinite live time and "waittimeout" is ignored.
I did start nsproxy some days ago on my production server and one process
exists now (tcl 8.4).
Now I'm testing nsproxy with tcl 8.5.
I did try
ns_proxy config myproxy -max 1 -getimeout 2000 -evaltimeout 4000
And I'm get result as:
[08/Mar/2009:04:04:21][16518.3060349840][-nssock:driver-] Notice: nssock:
listening on 10.0.2.15:8000
[08/Mar/2009:04:04:25][16518.3060210576][-default:0-] Notice: random:
generating 1 seed
[08/Mar/2009:04:04:25][16518.3060210576][-default:0-] Notice: encoding:
loaded: utf-8
proxy pid: 16528
main pid: 16518
195.122.250.12 - - [08/Mar/2009:04:04:25 +0300] "GET
/main.adp?menu=extension_reports_payments HTTP/1.1" 200 12096
195.122.250.12 - - [08/Mar/2009:04:04:25 +0300] "GET /styles/main/main.css
HTTP/1.1" 404 535
proxy pid: 16528
main pid: 16518
195.122.250.12 - - [08/Mar/2009:04:05:19 +0300] "GET
/main.adp?menu=extension_reports_payments HTTP/1.1" 200 12096
195.122.250.12 - - [08/Mar/2009:04:05:19 +0300] "GET /styles/main/main.css
HTTP/1.1" 404 535
[08/Mar/2009:04:07:04][16518.3060210576][-default:0-] Notice: exiting: timeout
waiting for connection
proxy pid: 16528
main pid: 16518
195.122.250.12 - - [08/Mar/2009:04:07:16 +0300] "GET
/main.adp?menu=extension_reports_payments HTTP/1.1" 200 12096
195.122.250.12 - - [08/Mar/2009:04:07:17 +0300] "GET /styles/main/main.css
HTTP/1.1" 404 535
proxy pid: 16528
main pid: 16518
195.122.250.12 - - [08/Mar/2009:04:08:08 +0300] "GET
/main.adp?menu=extension_reports_payments HTTP/1.1" 200 12096
195.122.250.12 - - [08/Mar/2009:04:08:08 +0300] "GET /styles/main/main.css
HTTP/1.1" 404 535
But default waittimeout must be equal to 100ms as described in
http://panoptic.com/wiki/aolserver/Nsproxy
And I did try
ns_proxy config myproxy -max 1 -getimeout 2000 -evaltimeout 4000 -waittimeout
1000
[08/Mar/2009:04:11:31][16545.3060657040][-nssock:driver-] Notice: nssock:
listening on 10.0.2.15:8000
[08/Mar/2009:04:11:33][16545.3060517776][-default:0-] Notice: random:
generating 1 seed
[08/Mar/2009:04:11:34][16545.3060517776][-default:0-] Notice: encoding:
loaded: utf-8
proxy pid: 16555
main pid: 16545
195.122.250.12 - - [08/Mar/2009:04:11:34 +0300] "GET
/main.adp?menu=extension_reports_payments HTTP/1.1" 200 12096
195.122.250.12 - - [08/Mar/2009:04:11:34 +0300] "GET /styles/main/main.css
HTTP/1.1" 404 535
proxy pid: 16555
main pid: 16545
195.122.250.12 - - [08/Mar/2009:04:11:51 +0300] "GET
/main.adp?menu=extension_reports_payments HTTP/1.1" 200 12096
195.122.250.12 - - [08/Mar/2009:04:11:52 +0300] "GET /styles/main/main.css
HTTP/1.1" 404 535
proxy pid: 16555
main pid: 16545
195.122.250.12 - - [08/Mar/2009:04:12:48 +0300] "GET
/main.adp?menu=extension_reports_payments HTTP/1.1" 200 12096
195.122.250.12 - - [08/Mar/2009:04:12:49 +0300] "GET /styles/main/main.css
HTTP/1.1" 404 535
So waittimeout is ignored. Am I right?
APD page code have section
ns_adp_puts [\
with-proxy myproxy {
puts "proxy pid: [ns_info pid]"
}]
puts "main pid: [ns_info pid]"
I did write wrapper for proxy as
proc with-proxy {proxy code} {
set handle [ns_proxy get $proxy]
set result [ns_proxy eval $handle $code]
ns_proxy release $handle
return $result
}
Infinite live time for proxy process is not problem but this behaviour is not
equal to documented.
Best regards.
--
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.