[naviserver-devel] select/poll (was: Re: Tcl nonblocking file IO in NaviServer?)

2019-07-19 Thread Jeff Rogers
Recent / upcoming releases of Tcl include support for poll and epoll to get past the limits of select. Is this going to conflict with anything in naviserver? https://core.tcl-lang.org/tips/doc/trunk/tip/458.md -J On 06/06/2019 12:23 PM, Gustaf Neumann wrote: I am rather planing to reduce

Re: [naviserver-devel] keepalive performance issue

2018-12-07 Thread Jeff Rogers
default Naviserver > > ns_section "ns/server/default" ns_param maxthreads 20 ns_param > minthreads 20 > > ns_section "ns/server/default/modules" ns_param nssock > nssock.so ns_param nslog nslog.so > > ns_section

Re: [naviserver-devel] keepalive performance issue

2018-11-30 Thread Jeff Rogers
Ok, thickening the plot a little bit - if I enable adp parsing and serve the exact same file as adp, the delay on localhost goes away. So, something weird with plain file handling on loopback? -J On 11/30/2018 11:51 AM, Jeff Rogers wrote: So really, this appears to be NOT a naviserver

[naviserver-devel] keepalive performance issue

2018-11-29 Thread Jeff Rogers
Hi all, I am running a test using ab against a local naviserver instance with a vanilla config, and I am seeing requests with http keepalive enabled having a delay of ~38ms per request compared to non-keepalive. This rather surprised me; is there a config setting to avoid that delay, or

Re: [naviserver-devel] Nsssl SNI

2015-07-03 Thread Jeff Rogers
I was just considering this exact same thing, and it appears the answer is no. You should be able to serve multiple vhosts on different ip addresses (or ports) by running nsssl multiple times with different cert configs, but that isn't particularly helpful. I haven't explored this completely,

[naviserver-devel] logging

2015-05-05 Thread Jeff Rogers
Hi all, I ran into a bug trying to change the loglevel for nsdb: ns_db verbose crashes with an assertion failure. It looks like this was recently changed to change the log level for the entire ns_db module rather than just for one handle (a change that IMHO makes sense), but this part doesn't

Re: [naviserver-devel] tcl modules

2014-12-18 Thread Jeff Rogers
modules are loaded at the end. -g Am 10.12.14 02:54, schrieb Jeff Rogers: Hi all, It looks like a tcl-only module declared in the conf file will get loaded twice by init.tcl (as a network and a non-network module). There's a mention in init.tcl about needing to do a 2-phase loading

[naviserver-devel] tcl modules

2014-12-09 Thread Jeff Rogers
Hi all, It looks like a tcl-only module declared in the conf file will get loaded twice by init.tcl (as a network and a non-network module). There's a mention in init.tcl about needing to do a 2-phase loading of the network modules, but loading modules twice seems wrong. ns_section

Re: [naviserver-devel] Naviserver hangs on Windows

2014-10-06 Thread Jeff Rogers
Gustaf Neumann wrote: Am 06.10.14 06:46, schrieb Jeff Rogers: This struck me as an interesting optimization question, so I wrote a quick program to test it (attached). This is not an interesting optimization question, since Tcl itself uses gettimeofday() (plus jumping around which might

Re: [naviserver-devel] Naviserver hangs on Windows

2014-10-05 Thread Jeff Rogers
Gustaf Neumann wrote: What i did was to extend configure to look, if there is gettimeofday() available on the system. If it is, it bypasses the call to Tcl_GetTime() to get the timestamp via system call. On busy systems, Ns_GetTime() is one of the most frequent calls, used e.g. for mutex

Re: [naviserver-devel] possible range bug?

2014-07-10 Thread Jeff Rogers
Gustaf Neumann wrote: Am 09.07.14 21:18, schrieb Jeff Rogers: If I understand correctly, this codepath if used for a non-file based return, so e.g., ns_return -binary should get here. The code paths are more complex and depend also on the settings of the configuration file (e.g. caching, mmap

[naviserver-devel] possible range bug?

2014-07-09 Thread Jeff Rogers
Hi all, As part of porting a feature to naviserver, I'm trying to understand all the code paths that outgoing data can take. I think I found a bug in the range handling code, but I can't figure out how to tickle it, which makes me wonder if there's something less-obvious going on. This code

Re: [naviserver-devel] default filename extension

2014-07-09 Thread Jeff Rogers
There's no builtin way I know of to define a default extension. I would do this with a preauth filter, something like this: === default_extension.tcl === ns_log notice Loading default extension proc default_extension {why} { set url [ns_conn url] # set loglvl notice set loglvl

Re: [naviserver-devel] Losing interp alias

2013-09-26 Thread Jeff Rogers
Hi David, This is a known deficiency - the introspection script that creates the tcl initialization script doesn't capture interp aliases. I don't think it's difficult to add, just hasn't been done yet. -J David Osborne wrote: Hi, Wondering if you can help with a problem. I am

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

2013-07-08 Thread Jeff Rogers
Gustaf Neumann wrote: also the definition of proc clock, which redefines itself in terms of an ensemble. This makes it sensitive to the definition order. I notice the same test case doesn't raise an error in Aolserver. Seems after a ns_eval the ::tcl::clock:: vars left not populated so

Re: [naviserver-devel] gzipped content delivery for static files

2013-07-03 Thread Jeff Rogers
Gustaf Neumann wrote: When the gzip_cmd is configured, NaviServer keeps track of updating the .gz file for the cases the source file is updated. There is no burden for the admin. The gzip command is called via Tcl exec, which can in turn be executed via nsproxy (see e.g. OpenACS). I took

Re: [naviserver-devel] removing obsolete functions

2013-01-19 Thread Jeff Rogers
These functions are all part of the public api, so they could conceivably be used in C extensions. How many of them actually are used is another story of course, and it's far from clear if anyone is developing C extensions. In general, I think it's a good thing to have a rich API, including

Re: [naviserver-devel] naviserver with connection thread queue

2012-11-29 Thread Jeff Rogers
Gustaf Neumann wrote: Funny enough, the delivery of the error message blocked the connection thread longer than the delivery of the image when it is above the writersize. I will reduce the writersize further, but still a slow delivery can even slow down the delivery of the headers, which

Re: [naviserver-devel] stacksize on linux

2012-11-06 Thread Jeff Rogers
|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f9115fb49d0, tls=0x7f9115fb4700, child_tidptr=0x7f9115fb49d0) = 11864 -gustaf Am 05.11.12 22:56, schrieb Jeff Rogers: Hi all, I've been trying to track down why my naviserver processes have such a large memory footprint compared to similarly

Re: [naviserver-devel] Changing pageroot

2012-11-01 Thread Jeff Rogers
It's pagedir rather than pageroot, and it's relative to the server root for virtual hosts (it can still be absolute). The documentation appears to be not up to date on this item. -J David Osborne wrote: Hi again, In Aolserver we used to change pageroot in the config as so: ns_param

Re: [naviserver-devel] lurking bugs: conn threads

2012-10-26 Thread Jeff Rogers
Stephen Deasey wrote: Interesting, but I wonder if we're not thinking this through correctly. My suggestion, and your here, and Gustaf's recet work are all aimed at refining the model as it currently is, but I wonder if we're even attempting to do the right thing? Do we even know what the

Re: [naviserver-devel] lurking bugs: conn threads

2012-10-26 Thread Jeff Rogers
Andrew Piskorski wrote: On Fri, Oct 26, 2012 at 08:30:26PM +0100, Stephen Deasey wrote: I was thinking it could work something like this: - driver acquires lock, takes first conn thread off queue, releases lock What if there are no conn threads waiting in the queue? Same as currently I'd

[naviserver-devel] compression

2012-10-25 Thread Jeff Rogers
It looks like we're enabling compression for all http/1.1 requests regardless of whether it was specified in the request header, or even specifically disallowed. This seems incorrect, but the code has been in place for several years (connio.c:CheckCompress) ; is there a reason not to change

Re: [naviserver-devel] [AOLSERVER] Naviserver Win-64 Sources

2012-10-17 Thread Jeff Rogers
offered mine. I expect others will chime in too, and they may well agree with you. Either way, we can still find some way to work together. -J -Original Message- From: Jeff Rogers [mailto:dv...@diphi.com] Sent: 17 October 2012 07:26 To: Maurizio Martignano Cc: naviserver-devel

Re: [naviserver-devel] lurking bugs

2012-10-12 Thread Jeff Rogers
Gustaf Neumann wrote: On 11.10.12 21:01, Jeff Rogers wrote: Gustaf Neumann wrote: Am 11.10.12 19:42, schrieb Jeff Rogers: I'll clean up my testcases and add them. great! Hrm. I have a completely reproducible case, good test case. The frequency in which the script sends new requests

Re: [naviserver-devel] lurking bugs

2012-10-11 Thread Jeff Rogers
Gustaf Neumann wrote: Am 11.10.12 19:42, schrieb Jeff Rogers: I'll clean up my testcases and add them. great! Hrm. I have a completely reproducible case, but I'm not sure how to actually write a .test file for it. Maybe you can give me some pointers. Here's the setup: config file

[naviserver-devel] lurking bugs

2012-10-10 Thread Jeff Rogers
Hi, I've been browsing the naviserver code, learning the differences from the aolserver code that I'm more familiar with, and checking for a few bugs that I've found and/or fixed previously. Here's what I've come across so far. These are all pretty unusual cases with straightforward

Re: [naviserver-devel] ns_set ... -persistent

2012-10-09 Thread Jeff Rogers
I don't know that people love it so much as that there is no exact replacement for the functionality. I'm a big proponent of compatibility but shared sets as they previously existed are problematic. I wouldn't be at all surprised if they are thread-unsafe to the point of being able to crash

Re: [naviserver-devel] ns_set ... -persistent

2012-10-09 Thread Jeff Rogers
Zoran Vasiljevic wrote: On 09.10.2012, at 20:49, Jeff Rogers wrote: creating a hashtable mapping the keys to indexes I assume you used Tcl hash-tables with TCL_STRING_KEYS? You know that ns_set keys can be case-insensitive? Yes - I've only half-implemented it so far, but the full

Re: [naviserver-devel] Migrating aol.com from proprietary platform (AOLserver) to Open Source

2009-07-13 Thread Jeff Rogers
Stephen Deasey wrote: Some pretty funny miss-statements in this history of AOLserver running aol.com: http://velocityconference.blip.tv/file/2286110/ Wow, the hatred for tcl is palpable. This is something I've never understood. -J

Re: [naviserver-devel] How to listen on 2 ports?

2008-10-24 Thread Jeff Rogers
Vasiljevic Zoran wrote: He you socket/driver gurus out there! What are my options if I want to have NS listen to more than one port? We have the setup with just one virtual servers and listen on 0.0.0.0 address (all interfaces). What we would like to do is to listen on 1 more port but

Re: [naviserver-devel] Bug in fastpath cache causes info leak

2008-08-19 Thread Jeff Rogers
Brett Schwarz wrote: Wow, I am amazed at the different reactions to this issue between this list and the aolserver list. Makes me want to switch to naviserver even more now... 90% of the difference is that the issue was introduced here by someone saying I contributed a patch. That in itself

Re: [naviserver-devel] ns_config read/write

2007-10-15 Thread Jeff Rogers
Vasiljevic Zoran wrote: Do you have some other idea how (if) we should build the chnageable config? It seems pretty silly to me that we need to restart the server to change some marginal parameter... In the 21. century... However this gets resolved, I think there should also be a way to

Re: [naviserver-devel] Quest for malloc

2007-01-16 Thread Jeff Rogers
Gustaf Neumann wrote: This is most probably the best variabt so far, and not complicated, such a optimizer can do the right thing easily. sorry for the many versions.. -gustaf { unsigned register int s = (size-1) 3; while (s1) { s = 1; bucket++; } } if (bucket

Re: [naviserver-devel] Directory structure

2006-01-19 Thread Jeff Rogers
Vlad Seryakov wrote: Hi, I am proposing new directory structure for /usr/local/ns, current installation of naviserver comes from aolserver multi-server environment which is not very usual. For beginners it is very confusing, for advanced users it does not matter because they customize it as