[naviserver-devel] ns_urldecode -charset

2012-10-30 Thread David Osborne
Hi, We're currently in the process of porting a fairly large code base from Aolserver to Naviserver for testing (using Naviserver v4.99.4 on Debian Squeeze). One thing that has come up so far is that ns_urldecode seems to have dropped the "-charset" switch. I'm assuming it used to be present sin

Re: [naviserver-devel] ns_urldecode -charset

2012-10-30 Thread David Osborne
Hi Gustaf, Yes, that looks great. Along with the ns_urlencode equivalent I think it would solve our problem. Thanks very much for the reply. - David On 30 October 2012 14:44, Gustaf Neumann wrote: > Dear David, > > would the following change help you? > > Before i finalize this change (do this

Re: [naviserver-devel] ns_urldecode -charset

2012-10-31 Thread David Osborne
On 30 October 2012 20:39, Stephen Deasey wrote: > On Tue, Oct 30, 2012 at 7:59 PM, Stephen Deasey wrote: > > > > But the code points of iso88591 are a subset of utf8... > > Actually, this doesn't make sense. The byte encoding of code points > above 128 uses two bytes for utf8, but only one byte

[naviserver-devel] Changing pageroot

2012-11-01 Thread David Osborne
Hi again, In Aolserver we used to change pageroot in the config as so: ns_param pageroot /new/page/root Should the same work in Naviserver? ns_info pageroot is returning /usr/local/ns/pages no matter what I put in the config for pageroot (built from the latest version in bitbucket). Trying to wor

Re: [naviserver-devel] Changing pageroot

2012-11-02 Thread David Osborne
Thanks Jeff and Gustaf. I found that setting pagedir had no effect under the server section (as is in the newly changed tests/http-test-config.tcl file) eg: ns_section "ns/server/${server_name}" ns_parampagedir $pageroot But if I added a subsequent fastpath section and added

[naviserver-devel] ns_eval -sync or -synch?

2013-02-08 Thread David Osborne
code form AOLserver to Naviserver and this is one difference between the 2 I suspect may be unnecessary? Regards, -- David Osborne Qcode Software Limited http://www.qcode.co.uk -- Free Next-Gen Firewall Hardware Offer Buy yo

[naviserver-devel] Nsssl - small logging glitch

2013-06-04 Thread David Osborne
rivers logs the "stopping" message for nsssl without any similar problems on the same installation. Could this be a local configuration problem? This is using the encoding defaults from conf/sample-config.tcl Regards, David Osborne --

Re: [naviserver-devel] Nsssl - small logging glitch

2013-06-04 Thread David Osborne
sue relating to how NsWaitDriversShutdown in > particular accesses the driver name, rather than a more global encoding > problem, since NsStopDrivers logs the "stopping" message for nsssl without > any similar problems on the same instal

[naviserver-devel] Clock.tcl repeat initialisation after ns_eval

2013-07-04 Thread David Osborne
Hi, Wondering if you can help us understand what's happening here. (Currently testing under naviserver 4.99.5 with Tcl 8.5.11) Our test case is the following proc: proc clock_test {} { log Notice [clock format [clock scan now] -format "%Y-%m-%d %H:%M:%S" -timezone :Tcl/Localtime] return

Re: [naviserver-devel] Clock.tcl repeat initialisation after ns_eval

2013-07-05 Thread David Osborne
level 1 [list namespace origin [lindex [info level 0] 0]]] -subcommands { add clicks format microseconds milliseconds scan seconds }] ...snip... -- David Osborne On 4 July 2013 21:12, Gustaf Neumann wrote: > Hi David, > > tricky thing: naviserver collects in its

Re: [naviserver-devel] Clock.tcl repeat initialisation after ns_eval

2013-07-05 Thread David Osborne
lock_test" line 5) invoked from within "clock_test" while executing callback ns:tclschedproc clock_test -- David Osborne On 5 July 2013 13:52, Gustaf Neumann wrote: > Hi David, > > strange, the indicated modification did make the change for me > (first broken

Re: [naviserver-devel] Clock.tcl repeat initialisation after ns_eval

2013-07-08 Thread David Osborne
e the same test case doesn't raise an error in Aolserver. Seems after a ns_eval the ::tcl::clock:: vars left not populated so ::tcl::clock::Initialize runs cleanly. Couldn't ascertain from my limited understanding of the internals why it should be different. -- David Osborne On 5

Re: [naviserver-devel] Clock.tcl repeat initialisation after ns_eval

2013-07-10 Thread David Osborne
ed as a BadTimeZone. So we can operationally get round this. We were just concerned it was exposing a bug. Whether or not it needs fixing, is definitely debatable! -- David Osborne -- See everything from the browser to th

[naviserver-devel] "::errorInfo": no such variable

2013-08-01 Thread David Osborne
cedure "nstrace::statescript" line 14) invoked from within "nstrace::statescript" (procedure "_ns_eval" line 15) invoked from within "_ns_eval { expr {1+1}}" -- David Osborne -

Re: [naviserver-devel] "::errorInfo": no such variable

2013-08-05 Thread David Osborne
8809a4b34f66a75379 > > all the best > -gustaf neumann > > Am 03.08.13 12:07, schrieb Gustaf Neumann: > > Am 01.08.13 15:00, schrieb David Osborne: > >> Hi, > >> > >> We intermittently encounter the above error when we call a ns_eval > >> fr

[naviserver-devel] Naviserver Debian package

2013-08-15 Thread David Osborne
Hi, In case anyone may find it of use, we have a Debian packaged version of Naviserver which is available for general use on Squeeze. The latest version, 4.99.5-4 is based the bitbucket v4.99.5 tag. The package should be treated as experimental. To install, add the following line to /etc/apt/sou

Re: [naviserver-devel] Clock.tcl repeat initialisation after ns_eval

2013-08-19 Thread David Osborne
Hi Gustaf, I made a build from current tip and retested as per the testing scenario you specified previously (/usr/local/ns/bin/nsd -c -u nsadmin -t /usr/local/ns/conf/nsd-config.tcl with the clock_test proc included as a module), and still see the error: % ns_schedule_proc -once 0 clock_test 1 %

Re: [naviserver-devel] Clock.tcl repeat initialisation after ns_eval

2013-08-19 Thread David Osborne
gt; http://www.tcl.tk/man/tcl8.5/TclCmd/clock.htm > > At least, i can't reproduce the problem with :localtime, all the > invocation patterns work fine for me. > Do you still get same errors, when using ":localtime"? > > > all the best > -gustaf neumann > >

[naviserver-devel] Losing interp alias

2013-09-26 Thread David Osborne
Hi, Wondering if you can help with a problem. I am attempting to preload the trf accelerated version of tcllib's ::md5::md5 in our naviserver config. As a simplified testcase to demonstrate what's happening I can do the following: - use a default configuration of naviserver, e.g. in /usr/local/

Re: [naviserver-devel] Losing interp alias

2013-09-27 Thread David Osborne
Thanks for the reply. I suspected it would be something to do with the tracescript. As an experiment I tried adding the following to the end of _serializensp in nstrace.tcl # Add aliases foreach alias [interp aliases {}] { if { [string match "$nsp*" $alias]

[naviserver-devel] Stack smashing on Wheezy

2013-10-02 Thread David Osborne
Hi again, I've just been attempting to package Naviserver for Debian Wheezy. Using tip (and I think also with v4.99.5 tag), I get a stack overflow when I try to load the nsperm module. To reproduce, I built on Wheezy (7.1) with: ./autogen.sh --with-tcl=/usr/lib/tcl8.5 --enable-symbols make make

Re: [naviserver-devel] Stack smashing on Wheezy

2013-10-03 Thread David Osborne
/naviserver/naviserver/commits/4e205d1a1332dfa59c594adf1589e2d436096721 > > best regards > -gustaf neumann > > > Am 02.10.13 18:02, schrieb David Osborne: > > Hi again, > > I've just been attempting to package Naviserver for Debian Wheezy. > > Using tip (and

[naviserver-devel] nsdbpg SSL mode

2013-11-18 Thread David Osborne
Hi, Can anyone tell us if it's possible to use the Naviserver nsdbpg drivers to connect directly via SSL to a SSL enabled Postgresql database? I think we'd be able to encrypt communication between an application server and DB server using stunnel if not, but wondered if this is something nsdbpg s

Re: [naviserver-devel] nsdbpg SSL mode

2013-12-06 Thread David Osborne
Amazon Postgresql RDS? That was exactly why we were asking. (slightly off-topic - apologies) We found that Postgresql RDS SSL was optional though.. could happily connect directly to the RDS instance via psql "sslmode=disable"... and also via nsdbpg but think this connection wouldn't be encrypted.

[naviserver-devel] dtplite

2014-01-09 Thread David Osborne
Hello, With regards to the following change... I've since been having problems with make build-doc not being able to find tclsh when trying to run dtplite. https://bitbucket.org/naviserver/naviserver/commits/43ac5ab18616/ Changeset: 43ac5ab18616 User:gustafn Date:2014-01-04 17:3

Re: [naviserver-devel] dtplite

2014-01-10 Thread David Osborne
Thanks Gustaf I'd never come across this before since I always use a debian packaged tcllib. It's easy enough to pass DTPLITE=dtplite during the build process so it's a simple workaround whether the change stays or goes. Thanks for filling me in. Regards, -- David On 9 January 2014 11:06, Gustaf

Re: [naviserver-devel] NaviServer 4.99.7 ante portas

2015-02-23 Thread David Osborne
recated function asctime() by a call to > asctime_s() > - remove hard-coded sizes of ip-addresses and replace it > by NS_IPADDR_SIZE > - don't hardcode sizes for string arrays > >* Use of modern-style

[naviserver-devel] Test Bus Error / Seg Fault 4.99.7

2015-02-27 Thread David Osborne
Hi, We're looking at doing a build of Naviserver tagged as 4.99.7. But we seem to be hitting an intermittent seg fault or bus error during the "make test". Sometimes the tests complete cleanly. It's often while running ns_conn.test, usually it PASSED ns_conn-1.2 then crashes. This is on a Debian

Re: [naviserver-devel] Test Bus Error / Seg Fault 4.99.7

2015-03-02 Thread David Osborne
should be a "ns:addr", ptr1 should be "nsv:array" and ptr2 > the arrayPtr. It is also interesting to see the pontents of arrayPtr. > > i've built and tested the server on various unix systems, the closest > was probably an ubunu 12.04. > > -g > > &

[naviserver-devel] --enable-rpath

2015-03-05 Thread David Osborne
)" LDRPATHS="\$(LDRPATH)" -CCRFLAG=$TCL_CC_SEARCH_FLAGS -LDRFLAG=$TCL_LD_SEARCH_FLAGS +CCRFLAG=$CC_SEARCH_FLAGS +LDRFLAG=$LD_SEARCH_FLAGS if test "$CCRFLAG" = "" ; then CCRPA

Re: [naviserver-devel] --enable-rpath

2015-03-06 Thread David Osborne
variants should be used, since these are tailored for Tcl. > > The TCL_* variables are set in the used tclConfig.sh. Which tclConfig.sh > are you using? > is it a "private" one or the Debian one? > > My suspicion is that some distros do not like the search-flags and clear >

[naviserver-devel] "trying to uncork an uncorked socket"

2015-03-09 Thread David Osborne
Hi again, We're getting some Error messages when we're browsing fastpath pages running tip via https. Not sure of this is anything to actually to worry about since there doesn't seem to be any side-effect except for the frequent error messages in the log. *[09/Mar/2015:15:59:06][17560.7fffedf3770

Re: [naviserver-devel] "trying to uncork an uncorked socket"

2015-03-10 Thread David Osborne
success = 1; +int success = 0; #ifdef TCP_CORK Sock *sockPtr = (Sock *)sock; On 9 March 2015 at 16:24, David Osborne wrote: > Hi again, > > We're getting some Error messages when we're browsing fastpath pages > running tip via https. > Not sure of this i

Re: [naviserver-devel] "trying to uncork an uncorked socket"

2015-03-12 Thread David Osborne
Thanks again Gustaf. Yes, it definitely felt like it was more of an annoyance than a operational problem. We haven't rolled out the new version to any of our busy servers yet but in test it's looking pretty good now. Regards, -- David Osborne Qcode Software Limited http://www.qcode.co

[naviserver-devel] "pthread_join failed in Ns_ThreadJoin: Invalid argument"

2015-03-26 Thread David Osborne
quot;Ns_ThreadJoin", "pthread_join", err); (gdb) list 454 455 assert(thread != NULL); 456 457 err = pthread_join(thr, argPtr); 458 if (err != 0) { 459 NsThreadFatal("Ns_ThreadJoin", "pthread_join", err); 460 } 461

Re: [naviserver-devel] "pthread_join failed in Ns_ThreadJoin: Invalid argument"

2015-03-26 Thread David Osborne
Hi Gustaf, The crashes we are seeing are not during shutdown, but during normal server operation which is why we are concerned about them. The system recovers quickly due to daemontools, but the scheduled tasks running at the time of the crash are aborted. There is nothing in the syslog to indica

Re: [naviserver-devel] "pthread_join failed in Ns_ThreadJoin: Invalid argument"

2015-03-26 Thread David Osborne
hread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0 * 1Thread 0x7f585181e700 (LWP 11461) 0x7f5858d39165 in raise () from /lib/x86_64-linux-gnu/libc.so.6 On 26 March 2015 at 12:38, Gustaf Neumann wrote: > Am 26.03.15 um 13:11 schrieb David Osborne: &g

[naviserver-devel] Naviserver as reverse proxy - header fields

2015-06-26 Thread David Osborne
sed like the following or are there other ways around this?: https://bitbucket.org/davidqc/naviserver/branches/compare/davidqc/naviserver:tip%0Dnaviserver/naviserver:default#diff Thanks -- David Osborne Qcode Software Limit

Re: [naviserver-devel] Naviserver as reverse proxy - header fields

2015-06-26 Thread David Osborne
Thanks Gustaf. No problem... I'll get the pull requests done shortly. On 26 June 2015 at 12:18, Gustaf Neumann wrote: > Both are valid requests and should go to the source base. david, could > you issue a pull request on bitbucket? > -g > > -- > Univ.Prof. Dr. Gustaf Neumann > WU Vienna > Insti

[naviserver-devel] Nsssl SNI

2015-07-03 Thread David Osborne
443 <- www.domain.com cert https://sub.domain.com -> nsssl.server.com:443 <- sub.domain.com cert (I don't think SNI is supported by nsssl - please correct me if I'm wrong) -- David Osborne Qcode Software Limited

[naviserver-devel] Escaping characters in access log

2015-07-14 Thread David Osborne
Hi, We're coming up against a problem where we attempt to parse data in a naviserver access log to analyse server use. We were relying on the combined log format being parsable but are running into difficulties when non-percent encoded characters are making their way into the logged request. For

Re: [naviserver-devel] Escaping characters in access log

2015-07-15 Thread David Osborne
aping for all double-quoted fields depending potentially on external > input, > such as the user agent field or the referrer field. > > all the best > -g > > Am 14.07.15 um 09:05 schrieb David Osborne: > > Hi, > > We're coming up against a problem where we attempt to p

[naviserver-devel] Disabling directorylisting

2015-07-23 Thread David Osborne
another way of doing this? Strikes me that directoryproc should default to _ns_dirlist no matter what directorylisting is set to? Could naviserver drop this check in fastpath.c, and leave the default value of directorylisting to be set in fastpath.tcl as in the following com

[naviserver-devel] ns_ssl and binary data

2015-07-23 Thread David Osborne
/form-data POST and attempting to proxy these requests to an upstream server using ns_ssl. Regards, -- David Osborne Qcode Software Limited -- ___ naviserver-devel mailing

Re: [naviserver-devel] ns_ssl and binary data

2015-07-29 Thread David Osborne
+ const char *body = (char *) Tcl_GetByteArrayFromObj(bodyPtr, &len); Ns_DStringPrintf(&httpPtr->ds, "Content-Length: %d\r\n\r\n", len); Tcl_DStringAppend(&httpPtr->ds, body, len); } else { On 23 July 2015 at 16:52, David Osborne wrote: > > Q

Re: [naviserver-devel] ns_ssl and binary data

2015-07-30 Thread David Osborne
Thanks Gustaf - I have just tried these changes and it appear to work just fine. I just have to be careful when handling the binary content to pass to the -body option, if I inadvertently force an internal string representation to be generated then if will be corrupted by ns_ssl in transit since i

[naviserver-devel] ns_sendmail's use of ns_sockopen

2015-10-15 Thread David Osborne
Hi, Been trying to use Naviserver's ns_sendmail for the first time. By default, speaking to localhost:25 (under Debian) I'm getting a "Operation now in progress" error at the point where ns_sockopen is called against localhost:25. I modified the code to use the -nonblock switch (just as an exper

Re: [naviserver-devel] ns_sendmail's use of ns_sockopen

2015-10-16 Thread David Osborne
t; [1] > > https://bitbucket.org/naviserver/naviserver/commits/6657f9b1b41aaefc5b452ed0c869659a682813af > > Am 15.10.15 um 18:27 schrieb David Osborne: > > Hi, > > > > Been trying to use Naviserver's ns_sendmail for the first time. > > > > By default, speak

Re: [naviserver-devel] NaviServer 4.99.9 available

2016-01-12 Thread David Osborne
Thanks Gustaf - that looks great. On-the-fly minification in particular will be very helpful. I noticed there is a recent intent-to-package ticket with Debian. Are there moves afoot to have Naviserver officially included in Debian? --

[naviserver-devel] Form vars + 302 redirect with trailing slash

2016-03-19 Thread David Osborne
HI, Quick question. We've noticed that when fastpath does an internal 302 redirect for URLs without a trailing slash, it seems to drop the query string. Is this intended behaviour? eg. http://site.com/news?a=1 302 redirects to http://site.com/news/ I think it maybe this redirect that's in action

[naviserver-devel] Building naviserver with merged nsssl

2016-06-22 Thread David Osborne
Hi, I've hit a problem trying to build naviserver (on Debian wheezy) since nsssl was merged into the main repo (which is a great idea btw). In the nsssl Makefile it references: include $(NAVISERVER)/include/Makefile.module but on a clean box that file will not exist yet. If I change it to NS

Re: [naviserver-devel] Building naviserver with merged nsssl

2016-06-27 Thread David Osborne
Thanks very much for looking at this Gustaf. We'll have another go at doing a build in due course. Regards, -- David On 25 June 2016 at 14:10, Gustaf Neumann wrote: > Dear David, > > i have addressed the problem with libnssock.dylib + rpath in the > repository. > Background: I've introduced libn

[naviserver-devel] Contention on mu12

2016-07-07 Thread David Osborne
I was wondering if someone could help us understand this Mutex Lock output from nsstats. It's ordered by Contention and it would seem the figures for mu12, and to a lesser extent, nsd:pool:, are quite high. I don't know what mu12 is used for. Could someone give an example of the sort of workload

Re: [naviserver-devel] Contention on mu12

2016-07-08 Thread David Osborne
Thanks for the info Gustaf. You gave us enough info to set us down the right path to working out what was the likely issue. If mu12 is the same or this server, and I think it is, this server seemed to be spending far too much time creating interpreters. Looking at potential causes of a high interp

[naviserver-devel] Permission Denied for Ns_SockBind

2016-07-29 Thread David Osborne
Hi, I'm having a few problems with a new build of Naviserver on Debian (wheezy & Jessie). Using Tip, when I try to start naviserver listening on a privileged port, with a non-root (but system) user, I'm getting a permission denied error from within Ns_SockBind: eg. [29/Jul/2016:10:05:07][10999.7

Re: [naviserver-devel] Permission Denied for Ns_SockBind

2016-07-29 Thread David Osborne
Hi, I've just noticed the prebind startup option *-b address:port* Prebind to address and port. This is necessary when starting the server under a priviledged port running with a non-root user-id. multiple prebind address might be specified in a comma separated list. So starting like this seems

Re: [naviserver-devel] Naviserver 4.99.12 : content-type of gzipped static content

2016-09-30 Thread David Osborne
Thanks Gustaf. I've added that patch to our build and it works fine now. Cheers. -- David On 30 September 2016 at 09:14, Gustaf Neumann wrote: > Am 29.09.16 um 13:03 schrieb David Osborne: > > I've come across a change in behaviour on upgrading to the 4.99.12 > > t

[naviserver-devel] Logpartialtimes seemingly giving runtime of *previous* request

2016-11-02 Thread David Osborne
Hi, I've spotted an issue that seems to have been introduced at some point between 4.99.10 & 4.99.11 (and still present in tip as of today). When logpartialtimes are enabled, the access log seems to be logging the runtime of the previous entry. As a testcase on Debian 8: hg clone https://bitbuck

Re: [naviserver-devel] Logpartialtimes seemingly giving runtime of *previous* request

2016-11-03 Thread David Osborne
wishes > Iuri > > > On 02-11-2016 13:49, David Osborne wrote: > > Hi, > > I've spotted an issue that seems to have been introduced at some point > between 4.99.10 & 4.99.11 (and still present in tip as of today). > When logpartialtimes are enabled, the acce

Re: [naviserver-devel] Logpartialtimes seemingly giving runtime of *previous* request

2016-11-03 Thread David Osborne
Thanks Gustaf. I've patched 4.99.12 with your changes and it seems to work fine now. Thanks for the fast response! Regards, David On 3 November 2016 at 10:12, Gustaf Neumann wrote: > > Am 02.11.16 um 16:49 schrieb David Osborne: > > I've spotted an issue that seems to h

Re: [naviserver-devel] gzipping static content - how to do?

2017-01-16 Thread David Osborne
On 16 January 2017 at 09:17, John from Decent Espresso < j...@decentespresso.com> wrote: > Thanks Gustaf (Hahaha) that is the cause of the mime-type problem. I’ve > upgraded to ns 4.99.15 and the MIME type bug is now gone. > > However, I’m still not having gzipped files automatically made. I’ve >

[naviserver-devel] Access logs logging 2 IPs for single request

2017-01-24 Thread David Osborne
Hi, Can anyone come up with a scenario where a request could have 2 peer IP addresses? We occasionally see entries in the naviserver access logs like this one and I'm really not sure what to make of them: 10.x.x.x, 37.x.x.x - - [23/Jan/2017:07:55:55 +] "GET / HTTP/1.0" 500 671 "https://www.d

Re: [naviserver-devel] Access logs logging 2 IPs for single request

2017-01-24 Thread David Osborne
ieb David Osborne: > > Can anyone come up with a scenario where a request could have 2 peer IP > addresses? > > We occasionally see entries in the naviserver access logs like this one > and I'm really not sure what to make of them: > > 10.x.x.x, 37.x.x.x - - [23/Jan/2017

[naviserver-devel] NsWriterQueue Assertion fails

2017-02-15 Thread David Osborne
Hi, We spotted that, if the following conditions are met, then a malformed HTTP request will make a Naviserver assert fail (4.99.15). - Naviserver is compiled with --enable-symbols - At least 1 writerthread is running - A malformed HTTP request is made to a fastpath file which is bigger

Re: [naviserver-devel] NsWriterQueue Assertion fails

2017-02-17 Thread David Osborne
erts to be enabled. I'll try your suggestions - thanks again. On 16 February 2017 at 02:26, Gustaf Neumann wrote: > Am 15.02.17 um 16:22 schrieb David Osborne: > > We spotted that, if the following conditions are met, then a malformed > HTTP request will make a Navi

[naviserver-devel] revproxy

2017-02-22 Thread David Osborne
Hi, We've been looking at using the new revproxy module in our environment. I'm not sure we can use the module as is, but we're interested in using the spool & backendReply procs in out our code. I think we should be able to replace ns_http queue/ns_http wait with the same ns_connchan callbacks a

Re: [naviserver-devel] revproxy

2017-02-22 Thread David Osborne
On 22 February 2017 at 13:49, Gustaf Neumann wrote: > Am 22.02.17 um 13:48 schrieb David Osborne: > > Short question: > Is there a way to influence which driver thread "ns_connchan open" will > use? > > ... no, since ns_connchan does not use the driver threads,

Re: [naviserver-devel] revproxy

2017-02-23 Thread David Osborne
ustaf Neumann wrote: > Am 22.02.17 um 16:29 schrieb Gustaf Neumann: > > Am 22.02.17 um 16:10 schrieb David Osborne: > > > >> - is the connection to the backend via https? >> > > Yes > > Without foing into details: When the connection to the backend is via >

Re: [naviserver-devel] revproxy

2017-02-23 Thread David Osborne
After this, I've been trying to get POST requests to work. I needed to change the revproxy code a little since, for me, the backend would wait forever for the POST body unless I explicitly sent it after opening the backend channel. This will now work fine for POSTs with a body of ~32,768 bytes and

Re: [naviserver-devel] revproxy

2017-02-24 Thread David Osborne
(In asnwer to the previous question, yes this is debian 8.7 with openssl 1.0.1t) On 24 February 2017 at 06:24, Gustaf Neumann wrote: > There are reports that SSL writes with large content cause problems. > I've uploaded a version of revproxy that avoids memory bloats on huge > files and that chu

Re: [naviserver-devel] revproxy

2017-02-27 Thread David Osborne
Perfect, thanks! On 24 February 2017 at 19:32, Gustaf Neumann wrote: > Am 24.02.17 um 18:21 schrieb David Osborne: > > Thanks, that's working great for me. > Have tested it with large POST data, binary data, UTF-8 data and all gets > handled perfectly. > > Only issue I

Re: [naviserver-devel] revproxy

2017-02-28 Thread David Osborne
19:32, Gustaf Neumann wrote: > >> Am 24.02.17 um 18:21 schrieb David Osborne: >> >> Thanks, that's working great for me. >> Have tested it with large POST data, binary data, UTF-8 data and all gets >> handled perfectly. >> >> Only issue I've come

Re: [naviserver-devel] revproxy

2017-03-01 Thread David Osborne
On 28 February 2017 at 17:55, Gustaf Neumann wrote: > Am 28.02.17 um 17:02 schrieb David Osborne: > > In that case, we get a ~5 second delay, > do you see the same behavior for static content (fastpath) and dynamic > content? > -g > Yes, identical results returning cont

[naviserver-devel] revproxy timeouts

2017-03-31 Thread David Osborne
Hi, I've been trying to get revproxy to work with a timeout. So if the backend doesn't reply within $timeout secs, then the connection is closed. What I thought we could do was set a timeout when creating the callback to call backendReply. Then when the callback is triggered with $when eq "t" we

Re: [naviserver-devel] revproxy timeouts

2017-04-03 Thread David Osborne
On 2 April 2017 at 12:00, Gustaf Neumann wrote: > Just to be sure: timeouts during connection creation work fine, but read > timeouts from the back-end lead to the problem. ... and this happened with > an https backend. And you are experiencing this under Linux. Did i > understand this correctly?

[naviserver-devel] Build Errors in Debian

2017-04-04 Thread David Osborne
Hi, This recent change means I no longer build naviserver tip on Debian 8.6 due to the compiler complaining the following sockfile.c switch statement has the same case twice. https://bitbucket.org/naviserver/naviserver/commits/1fadec70fa7612f9a541116a1a2e72b69a9dacf7#chg-nsd/sockfile.c The follow

Re: [naviserver-devel] revproxy timeouts

2017-04-05 Thread David Osborne
Thanks very much. That's similar to what I was trying (although I was setting the timeout for the backendReply callback only since it should be the first thing to be called on reply if I understand rightly). I get the same behaviour with your code. Say I request a backend URL that takes 10 second

Re: [naviserver-devel] revproxy timeouts

2017-04-06 Thread David Osborne
Hi Gustaf, I can confirm that if I switch to using http (rather than https) then your timeout modification works perfectly. So looking like it's (at least) ssl specific, On 5 April 2017 at 18:03, Gustaf Neumann wrote: > Am 05.04.17 um 18:45 schrieb David Osborne: > > So althou

Re: [naviserver-devel] ns_chan and ns_connchan

2017-04-07 Thread David Osborne
icht: Landesgericht Linz > > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _

Re: [naviserver-devel] ns_chan and ns_connchan

2017-04-07 Thread David Osborne
ments to show the > progress of the operations. > > Am 2017-04-07 um 10:57 schrieb David Osborne: > > Re the first issue, I only have experience of ns_connchan but I believe > the situation is the same. > You can specify r,w,e, or x for the *argument* ?when? upon creation of the

Re: [naviserver-devel] revproxy timeouts

2017-04-07 Thread David Osborne
t; The bug was a problem in nsssl triggered by "ns_connchan close". > The same verison of revproxy should work. > > all the best > -g > > > Am 06.04.17 um 12:21 schrieb David Osborne: > > Hi Gustaf, > > I can confirm that if I switch to using http (rat

[naviserver-devel] revproxy callback setup

2017-04-10 Thread David Osborne
Hi, While testing the revproxy code I coming across the occasional error like the following: connchan "conn237" does not exist while executing "ns_connchan callback -timeout $timeout $frontendChan [list spool $frontendChan $backendChan client $timeout 0 ] rex" Seems like sometime

Re: [naviserver-devel] revproxy callback setup

2017-04-10 Thread David Osborne
. On 10 April 2017 at 14:29, David Osborne wrote: > Hi, > > While testing the revproxy code I coming across the occasional error like > the following: > > connchan "conn237" does not exist > while executing > "ns_connchan callback -timeout $timeout $

[naviserver-devel] ns_proxy hang

2017-04-18 Thread David Osborne
Hi, We're encountering an occasional problem which means calls to ns_proxy hang forever. It seems to be when an ns_proxy eval command timeouts during evaluation & it produces a large amount of output. Under those circumstances ns_proxy becomes inoperable. Following is a contrived test case which

Re: [naviserver-devel] ns_proxy hang

2017-05-10 Thread David Osborne
Has anyone got any ideas on debugging this issue? Turns out it's causing us many more operational issues that we first thought... Regards, -- David On 18 April 2017 at 15:44, David Osborne wrote: > Hi, > > We're encountering an occasional problem which means calls to ns_p

Re: [naviserver-devel] ns_proxy hang

2017-05-10 Thread David Osborne
The manifestation for us in production is quite insidious and difficult to spot the root cause of. Certainly not easy to see via the logs. One place we are experiencing it is in code which generates outgoing emails. Sometimes, when the outgoing email is particularly large, nsproxy times out while

Re: [naviserver-devel] ns_proxy hang

2017-05-10 Thread David Osborne
/sysv/linux/x86_64/clone.S:111 On 10 May 2017 at 13:04, Gustaf Neumann wrote: > We don't see such hangs either. Does increasing the waittimeout solve this > issue? > ... not as a fix, but to narrow the problem down. > -gn > > Am 10.05.17 um 13:38 schrieb David Osborne: >

Re: [naviserver-devel] ns_urlencode on Windows Naviserver

2017-05-12 Thread David Osborne
-mail is strictly prohibited. Quest Computing Ltd., Ushers Court, > 31-33 Ushers Quay, Dublin 8, Ireland. Quest Computing Ltd. is registered in > Ireland No. 146435. > > > > > > -------- > ---

Re: [naviserver-devel] ns_proxy hang

2017-05-12 Thread David Osborne
libc-start.c:287 #4 0x00400765 in _start () On 10 May 2017 at 15:27, Gustaf Neumann wrote: > I'll look at it at the weekend - unless someone else can fix this before > this. > > -g > Am 10.05.17 um 16:00 schrieb David Osborne: > > Increasing waittimeout doesn't

Re: [naviserver-devel] ns_proxy hang

2017-05-15 Thread David Osborne
Thanks. This does indeed seem to fix the test case I sent - however I'm now getting a segmentation fault during the "make test". It's during the second ns_proxy 5.10 test (there are two 5.10s) - "test ns_proxy-5.10 {check killing active proxy}". ns_close is being called on an invalid SlavePtr du

Re: [naviserver-devel] ns_proxy hang

2017-05-15 Thread David Osborne
d 7640 won't die, send signal 15 [15/May/2017:15:03:52][7028.7fffc67fc700][-nsproxy:reap-] Error: process 7640 killed with signal 15 (Terminated) [15/May/2017:15:03:53][7028.7fffc67fc700][-nsproxy:reap-] Warning: nsproxy: zombie: 7622 On 15 May 2017 at 14:45, Gustaf Neumann wrote:

Re: [naviserver-devel] ns_proxy hang

2017-05-15 Thread David Osborne
In some cases (but not all), Ns_WaitProcess is logging an error immediately after the reaper sends a signal 15. It's under these circumstances ReleaseProxy seems to find the proxy Busy without a slave. [15/May/2017:16:38:39][23802.7f2f0d7fa700][-nsproxy:reap-] Warning: [testpool]: pid 5174 won't

Re: [naviserver-devel] ns_proxy hang

2017-05-17 Thread David Osborne
Thanks Gustaf. We've tested and rolled this change out now and it's looking good. Regards On 15 May 2017 at 21:01, Gustaf Neumann wrote: > Am 15.05.17 um 17:54 schrieb David Osborne: > > In some cases (but not all), Ns_WaitProcess is logging an error > > immediately

Re: [naviserver-devel] ns_proxy hang

2017-05-29 Thread David Osborne
Thanks very much Gustaf! We'll schedule a build and let you know how it goes. On 25 May 2017 at 11:32, Gustaf Neumann wrote: > > but i will be looking into this when times allows. > David, There are now some updates in the repository, removing falso > positives about zombies etc. for eval-timout

[naviserver-devel] "ns_server active" request IP - proxy aware?

2017-09-29 Thread David Osborne
Hi, We have a need for ns_server active & queued commands to be proxy-aware in the IP addresses that they report. Similar to how the access log IP address can be configured to report the X-Forwarded-For value (if it exists)

Re: [naviserver-devel] "ns_server active" request IP - proxy aware?

2017-10-04 Thread David Osborne
id commands. > By moving it to the end, it can be made specific to the three sub-commands > where it makes sense ("active", "queued", and "all"). > > all the best > -gn > > Am 29.09.17 um 5:50 PM schrieb David Osborne: > > Hi, > > We have a n

Re: [naviserver-devel] "ns_server active" request IP - proxy aware?

2017-10-05 Thread David Osborne
Hi, After an initial rollout we made a change to our code which massive increased the number of times ns_server is called with the -checkforproxy switch - we than started to get intermittent seg faults. I can reproduce this is test with gdb. It does seem to be related to the new section of code w

Re: [naviserver-devel] "ns_server active" request IP - proxy aware?

2017-10-06 Thread David Osborne
Thanks Gustaf, I can only really reproduce it by hammering my development instance using apache bench (and only with a concurrency level of >100 after a few hundred requests) - not very scientific. The purpose of the filter_dos_check filter is to examine the server load (via ns_server active) and

Re: [naviserver-devel] "ns_server active" request IP - proxy aware?

2017-10-06 Thread David Osborne
connections. I would > rather recommend to use > either nsvs to track connections/peers, or to use a separate monitoring > thread keeping this information > up to date, receiving information about starting and ending threads. > > please check, if the changes work as well with your

[naviserver-devel] Profiling

2018-02-13 Thread David Osborne
Hi, We've been looking at profiling the execution times of various application-level procs running NaviServer. We want the ability to turn on profiling for selected commands, so we started off using Tcl traces in a manner similar to: http://nikit.tcl.tk/page/Profiling+with+execution+traces So we

  1   2   >