Re: [AOLSERVER] AOLserver Applications Spec DRAFT

2005-02-09 Thread Jim Wilcoxson
Maybe an interface to memcached would make sense... > > Nsvs are, to me, global in essence. As such, I don't really see making > namespace aware as a good goal. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body

Re: [AOLSERVER] AOLserver, NTLM, Apache+mod_proxy,

2005-02-09 Thread Jim Wilcoxson
Hi - I don't know how others feel, but one of the "community" issues I'm having is that a mailing list is not a great place to have 5 discussions going on at once, IMO. If the mailing list does get more active (which in a way would be great), I would probably have to just unsubscribe. I think it'

Re: [AOLSERVER] AOLserver facelift.

2005-02-08 Thread Jim Wilcoxson
Hi - I read the entire thread mentioned below, and missed any mention of anyone saying the AS maintainers would not accept FastCGI. The other thing I guess I'm confused about, is that CGI is implemented as an AS module. Why can't someone write a FastCGI module, and whoever wants it can load it to

Re: [AOLSERVER] ns_share performance in 4.x (was Re: AOLserver

2005-02-07 Thread Jim Wilcoxson
Hi Jeff - thanks, I didn't know that top-level stuff wasn't compiled. I might give the benchmark another try this weekend, when I have some time to setup an 8.X server on a test machine. Jim > I would *not* expect this code to gain any speed. The main mantra > of Tcl programming for performance

Re: [AOLSERVER] ns_share performance in 4.x (was Re: AOLserver facelift.)

2005-02-07 Thread Jim Wilcoxson
issues that might occur, as they have for some people on the list. Jim > > On 2005.02.06, Jim Wilcoxson <[EMAIL PROTECTED]> wrote: > > we're using ns_shares heavily and so are stuck with TCL 7.x, which is > > no longer supported. (I know there are hacks in TCL 8 for ns_sha

Re: [AOLSERVER] AOLserver facelift.

2005-02-06 Thread Jim Wilcoxson
I am a bit on the sidelines, because of a) time constraints, and b) we're using ns_shares heavily and so are stuck with TCL 7.x, which is no longer supported. (I know there are hacks in TCL 8 for ns_shares, but when we benchmarked them, they were much slower. So no compelling reason to upgrade, f

Re: [AOLSERVER] AOLserver facelift.

2005-02-05 Thread Jim Wilcoxson
Just stating that AOL runs its entire operation using 30 servers running AOLServer is the kind of information that IMO would impress new potential AS users enough to try it. It instantly changes AS from an experimental, weird, "I never heard of it" web server, to something with clout. I'd think i

Re: [AOLSERVER] The 'weird 0 length problems' revisited

2004-12-08 Thread Jim Wilcoxson
You can also get a zero content length logged if you have a C module that does Ns_ConnWrite and writes the headers and content itself, then closes the connection (even if there is a valid Content-Length header on the response), or if nothing is written out - for example, your TCL script goofs up an

Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-19 Thread Jim Wilcoxson
f the socket drivers to support multiple protocols, maybe it's a good time to consider output spooling too. To me, tuning the cache is a totally separate issue, but may also be useful. Jim > > On 2004.08.19, Jim Wilcoxson <[EMAIL PROTECTED]> wrote: > > For fastpath (static fil

Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-19 Thread Jim Wilcoxson
CD images or a distribution of > Debian packages :-) ... > > > On Thu, 2004-08-19 at 06:14, Jim Wilcoxson wrote: > > I guess I was unclear in my earlier note: > > > > 1. The HTTP driver thread reads all input for request, w/o blocking. > > My understanding is th

Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-19 Thread Jim Wilcoxson
n-blocking filesystem I/O (actually just reading is needed), or an asynchronous sendfile, but I agree with you that there are not good portable ways to do that yet. Jim > On Wed, 2004-08-18 at 09:21, Jim Wilcoxson wrote: > > ... > > > > AOLserver is ideally suited to the major

Re: [AOLSERVER] QOS

2004-08-18 Thread Jim Wilcoxson
> > figure out where Google's robots live. That's why I was suggesting > > that the dispatching algorithm needs to be a registered proc. > > Perhaps it could be both. Yeah, that would be nice. No doubt many people would want to group just by URL, and that would solve several of the cases I raise

Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-18 Thread Jim Wilcoxson
... > > AOLserver is ideally suited to the majority of server tasks. About the > > only shortcoming which comes to mind is that conn threads are required > > to do blocking writes. But fixing that would be of benefit to the HTTP > > processing side too. > > So, we want reader threads and separate

Re: [AOLSERVER] Progress report

2004-08-18 Thread Jim Wilcoxson
maxconnections should be high, like 100. This is the number of keepalive socket connections your server maintains. These are low overhead, and make it faster for active browsers to get pages from you site since they don't have to reconnect. We use a keepalive timeout of 15 (seconds). That means

Re: [AOLSERVER] Progress report

2004-08-18 Thread Jim Wilcoxson
Hi - a few suggestions/ideas: 1. How many requests per second do you average, and what are your burst rates like? What are your vmstat numbers like during average and burst request processing, and how do they compare to when your system is lightly loaded? Getting familiar with these numbers will

Re: [AOLSERVER] QOS

2004-08-18 Thread Jim Wilcoxson
Hi - To put spiders in a separate thread pool, mapping requests to thread pools by url doesn't work. You have to map by regular expression on the User-Agent header or by IP address, assuming you can figure out where Google's robots live. That's why I was suggesting that the dispatching algorithm

Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-17 Thread Jim Wilcoxson
>From my point of view, focusing on protocols is not necessarily the only reason to want thread pools. I'm not all that familiar with AS 4 yet, so maybe I'm being dense here... keep that in mind. :) The reason thread pools would be interesting to me personally is to be able to control quality of

Re: [AOLSERVER] file upload corrupts jpg images

2004-08-09 Thread Jim Wilcoxson
I seem to recall that the form file upload handler was rewritten in C for 3.5. It was in TCL before that. You could write a test script that does your file upload and runs an md5 on the temp file, while it still exists, with the exec command. Do a bunch of those with the old server and new server

Re: [AOLSERVER] SQLite

2004-07-14 Thread Jim Wilcoxson
A suggestion: the SQLite DB driver could keep a serial number that is incremented whenever the DB is modified by the driver. The driver could then re-open the DB if the file handle it gets from gethandle is stale. It wouldn't work in the case of another process outside the web server modifying th

Re: [AOLSERVER] Virtual hosting under 4.x and default Host: header

2004-07-13 Thread Jim Wilcoxson
> How do people feel about this? Is glob matching wanted enough to incur > that per-request cost -- only if you're configured for software virtual > hosting, of course. How about: try hash match if not found try glob matching against the list of virt. server wildcards if found a match

Re: [AOLSERVER] TclX keyed list changes in HEAD

2004-06-22 Thread Jim Wilcoxson
Hi - here are my thoughts on compatibility: Breaking compatibility at the TCL level is worse than breaking it at the C level. If someone wants to write a new, incompatible version of ns_return for example, it should be called something else and a compatibility wrapper written for ns_return that c

Re: [AOLSERVER] ANN: Searchable list archive at Gmane.org

2004-06-19 Thread Jim Wilcoxson
ut adding a whitelist to our spam filter! Jim > On 2004.06.18, Andrew Piskorski <[EMAIL PROTECTED]> wrote: > > On Fri, Jun 11, 2004 at 02:50:40PM -0700, Jim Wilcoxson wrote: > > > If you are interested in adding historical stuff to the archive, I have > > > the m

Re: [AOLSERVER] ANN: Searchable list archive at Gmane.org

2004-06-11 Thread Jim Wilcoxson
If you are interested in adding historical stuff to the archive, I have the mailing list from March 23rd, 1996 to Oct 9, 1999. Lemme know. Jim > As an added bonus (!!!), I've supplied my own personal mail archive of > all the messages I've received from the list since January 2000 when the > lis

Re: [AOLSERVER] ns_set questions

2004-06-11 Thread Jim Wilcoxson
Sets allow entries with duplicate keys. If duplicates are returned in the list for this new ns_set keys, that's fine, except that a naiive programmer can't go through the list of keys returned and fetch the corresponding values. You'd have to do a foreach loop on the keys, increment a counter, an

Re: [AOLSERVER] Ns_conn without passing it around

2004-06-07 Thread Jim Wilcoxson
For 3.4, it's: Ns_Conn *conn; /* get connection structure */ conn = Ns_TclGetConn(interp); if (conn == NULL) { Tcl_AppendResult(interp, "NULL conn??", NULL); return TCL_ERROR; } Jim > > Is there a way to obtain the current connection's Ns_conn if > it's not passed into a C fu

Re: [AOLSERVER] ADP Processing happens when...?

2004-05-12 Thread Jim Wilcoxson
I made this suggestion a while ago (sending the output in an output thread). One argument against it at the time is that on a multi-processor machine, you may not be able to take advantage of all the processors. However, input and output spooling is not CPU intensive, so I don't think it's all th

Re: [AOLSERVER] Bug #879076 (Output header issue)

2004-01-28 Thread Jim Wilcoxson
Hi - Tom suggested deleting the keys before adding them, but I don't think this will work because fastpath is being invoked after the TCL executes. No matter what you do in TCL, if fastpath runs afterwards, the current code will add a new Last-Modified header. Haven't verified this - just my beli

Re: [AOLSERVER] SQL error reporting

2004-01-28 Thread Jim Wilcoxson
al server message, one error before the "not > returning rows" one. > > Bas. > > Jim Wilcoxson said: > > In one of the 3.x releases, I think after 3.2, AS stopped reporting > > the details of SQL select errors. Instead of giving the detailed > > SQL

[AOLSERVER] SQL error reporting

2004-01-27 Thread Jim Wilcoxson
In one of the 3.x releases, I think after 3.2, AS stopped reporting the details of SQL select errors. Instead of giving the detailed SQL error, like "expected comma after blah", AS started reporting "Query was not a statement returning rows." This isn't very useful for error trapping and reportin

Re: [AOLSERVER] Bug #879076 (Output header issue)

2004-01-27 Thread Jim Wilcoxson
Hi - For 3.4x, look in nsd/return.c and nsd/fastpath.c; fastpath is calling Ns_ConnSetLastModifiedHeader in return.c to set Last-Modified. This routine calls Ns_ConnSetHeaders, which does an ns_set put, but it could easily call Ns_ConnCondSetHeaders, which would only do the put if the header does

Re: [AOLSERVER] Server doesn't recognize directories starting with +

2004-01-26 Thread Jim Wilcoxson
Hi - Is this maybe a URL quoting issue, where + is getting changed to space, ie, you may have to use %xx in the URL (don't know the numbers for percent off hand) rather than http://blah.com/+contents Jim > > Fastpath.c doesn't recognize directories starting with a plus sign (+). Thus > _ns_dirli

Re: [AOLSERVER] aolserver 3.4.2 configuration questions

2004-01-21 Thread Jim Wilcoxson
Your servername may not be set correctly in nsd.tcl, so it isn't looking at the enabletcl directive in your /ns/server/servername section. Jim > > It is very strange but I don't see no 'Notice: tcl: > enabling .tcl pages'... > And it also seems that my enabbletcl true statement in > my config fil

Re: [AOLSERVER] nssock: server ready - resuming

2004-01-20 Thread Jim Wilcoxson
These messages mean that the server received a request, but there were no free connection threads to pass the request to, ie, all of your threads were busy. The naive solution is to increase MaxThreads, but this likely won't solve your problem. For example, if your machine is out of CPU, setting

Re: [AOLSERVER] nsd and memory leaks

2004-01-12 Thread Jim Wilcoxson
Okay. From the discussion I was under the impression that each thread had its own arena, so reinitializing would free the entire arena. (I'm talking about a big block of virtual memory when I say arena.) An option would be to give each thread its own private arena, with the size configurable at

Re: [AOLSERVER] nsd and memory leaks

2004-01-10 Thread Jim Wilcoxson
Here's a script to dump out the memory pool info: set text "" set elname "blocksize nfree nget nput nrequest nlock nwait" foreach pel [ns_info pools] { append text "\nPoolname: [lindex $pel 0]\n" set i 0 foreach el [lindex $pel 1] { append text " [lindex $elname $i]: $el\n

Re: [AOLSERVER] nsd and memory leaks

2004-01-09 Thread Jim Wilcoxson
My personal opinion is that one of the responses to this simple question was pretty shitty, and totally inaccurate. In our experience, an image-serving copy of AOLserver with 30 threads configured runs in about 25MB, regardless of the load, and serving dynamic content on 30 threads takes 100-200MB

Re: [AOLSERVER] Mention of AOLserver in Feb 2004 Linux Journal.

2004-01-09 Thread Jim Wilcoxson
Mathopd will have higher latency as an image server, because it is single threaded and doesn't do asynchronous disk I/O. So on a high-end server, the number of IOs/sec it can generate is limited. AS does not have this problem since it is multi-threaded. However, mathopd services requests in a ve

Re: [AOLSERVER] how to return a custom 404 page with code 404?

2004-01-04 Thread Jim Wilcoxson
Because this is implemented using a general internal redirect mechanism in the server. For AS to return the 404 automagically, it would need a "default http status" field in the connection structure to keep track of this state, and then there would be some confusion over what to do with the defaul

Re: [AOLSERVER] how to return a custom 404 page with code 404?

2004-01-04 Thread Jim Wilcoxson
And don't forget the closing bracket after pageroot, like I did! ;) > Instead of putting notfound.html as your parameter, you could use > notfound.tcl and create a new tcl script with this line: > > ns_returnfile 404 text/html [ns_server pageroot/global/notfound.html > > Save this script as /glob

Re: [AOLSERVER] how to return a custom 404 page with code 404?

2004-01-04 Thread Jim Wilcoxson
Instead of putting notfound.html as your parameter, you could use notfound.tcl and create a new tcl script with this line: ns_returnfile 404 text/html [ns_server pageroot/global/notfound.html Save this script as /global/notfound.tcl Good luck! Jim > > I would like my server to return a custom

Re: [AOLSERVER] HTTP_RAW_POST_DATA equivalent in AOLSERVER TCL

2003-12-01 Thread Jim Wilcoxson
Try ns_writecontent. That will write the post data to a file (I think) and then you can muck with the file data using TCL. So, for example: # get interp # for a unique file name (or use ns_mktemp, or ...) set me [ns_info interp] set fd [open /tmp/post$me w+] ns_unlink /tmp/post$me ns_wri

Re: [AOLSERVER] aolserver 4 continually respawning

2003-11-24 Thread Jim Wilcoxson
We've also randomly seen this "unable to alloc bytes" error message when starting 3.4. In our case, it's not a VM resource problem - it's some other kind of weirdness. It displays this message, exits, init respawns it, then it starts okay. Probably not at all related to your situation, since yo

Re: [AOLSERVER] Jim's Sunday commits and AOLserver 4.1

2003-11-18 Thread Jim Wilcoxson
> In a message dated 11/18/2003 12:03:27 AM Eastern Standard Time, > [EMAIL PROTECTED] writes: > Subject: Re: Jim's Sunday commits and AOLserver 4.1 > > On 2003.11.17, Jim Davidson <[EMAIL PROTECTED]> wrote: > > Glad somebody noticed the new code :) The changes to kick of 4.1 were in > two > > are

Re: [AOLSERVER] aolserver 4.0 shutdown hangs

2003-11-17 Thread Jim Wilcoxson
We're having this problem with 3.4 on Linux 2.4.20 too. It didn't happen very often with 2.2.20, but with 2.4.20 AS frequently hangs after an ns_shutdown and has to be killed. Just another data point. Jim > > Hello all, > > i was trying to upgrade to aolserver 4.0 but noticed that every time i

Re: [AOLSERVER] nsd binding to > 1 port?

2003-11-03 Thread Jim Wilcoxson
You can easily bind to more than one port/IP address, however, I believe all requests in 3.x are dumped into a common connection queue, which does not solve the original problem. It sounds like you want multiple connection queues, so that one can be overloaded yet the other is still getting servic

Re: [AOLSERVER] [Tcl-Threads] Erlang's mnesia database?

2003-10-07 Thread Jim Wilcoxson
I think Solid has versions of their database server that: - can be loaded directly with the application; no separate process - are thread-safe - have support for in-memory tables http://www.solidtech.com Good luck! Jim > I don't intend to go back and change that particular application now, > an

Re: [AOLSERVER] Relating the Unix process ID to server logs and TCL

2003-08-14 Thread Jim Wilcoxson
[ns_info pid] does return the parent nsd process on 3.4. On a production system, when top or ps shows an nsd process chewing up 90% of a CPU, it would be useful to relate that to server.log entries. Or something. Right now it can't be related to anything. The parent nsd's process number isn't us

[AOLSERVER] Relating the Unix process ID to server logs and TCL

2003-08-14 Thread Jim Wilcoxson
Hello - does anyone know an easy way to relate the Unix process ID (Linux) for an AOLServer thread back to the server.log file. Can TCL get the Unix process ID for a thread? >From what I can tell, server.log entries say [PPID.xxx], where: [09/Aug/2003:11:38:33][23511.6151][-conn0-] Notice: get=t

Re: [AOLSERVER] Relating the Unix process ID to server logs and TCL

2003-08-11 Thread Jim Wilcoxson
Cool, thanks. We're still on the 3.2 and using 7.6 TCL, so I'll have to fiddle this a bit. It just seemed like some form of ns_thread (or something else) should return the pid, but I couldn't find it. Thanks again, JIm > > On 2003.08.09, Jim Wilcoxson <[EMAIL PROTECT

Re: [AOLSERVER] Pound vs. ns_write

2003-07-19 Thread Jim Wilcoxson
FWIW, I hate having a bunch of separate TCL routines to do related things. IMO, one of the nice things about TCL is that knowing you want to do a file thing makes it reasonable to look at [file] first, not [openfile], [rewindfile], [truncatefile], ... Separate routines makes it harder to find out

Re: [AOLSERVER] weird 0 length problems

2003-07-06 Thread Jim Wilcoxson
> The thing is I can't reproduce it, even when doing ab on both the same > host and another one on a 100MBit LAN. I've hit about 3k hits and > nothing. You are sending concurrent requests, right? -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an emai

Re: [AOLSERVER] weird 0 length problems

2003-07-06 Thread Jim Wilcoxson
We had a weird problem like this with ns_shares. There was a race in the shared array variable evaluation code that occurred around 1 in 20K requests on a production server. To track it down, I had to use 2 dedicated dual-cpu servers on a 100Mbit LAN, and used ab on one server to send simultaneou

Re: [AOLSERVER] AOLServer dies...

2003-06-17 Thread Jim Wilcoxson
If you using TCL 7.6 and ns_share arrays, there is a race condition that will crash your server. > > Im currently running 2 instances of aolserver-3.4.2 one in port 80 and the > other on 8080.. both service are catering openacs4.6 and 4.6.2 > respectively... > > 8080 just wont stay alive... this o

Re: [AOLSERVER] [ aolserver-Feature Requests-746579 ] Server instance

2003-06-06 Thread Jim Wilcoxson
We still have instances where AOLServer (3.2) "goes deaf" for some reason. The nsd processes are there, but they aren't handling any requests. So while I think this suggestion is a good idea, it probably won't take the place of watchdog monitoring, at least not for real production sites. "Are yo

Re: [AOLSERVER] BIG problem with Tcl8.4.(1|2)

2003-03-27 Thread Jim Wilcoxson
It seems that if people wanted to use generally-available TCL packages inside AOL, it'd be nice if cd worked and was per-thread. Otherwise, even if the TCL internals are fixed to lock around the temporary cd fiddling it does in realpath or wherever else, ordinary TCL packages still won't work in a

Re: [AOLSERVER] Nesting ns_db select

2003-03-15 Thread Jim Wilcoxson
You need to use two different DB handles, since the state of 2 selects cannot be maintained in 1 DB handle. > > Can I not nest ns_db select statements? > > > set classes [ns_db select $dbh "SELECT * FROM classes"] > while {[ns_db getrow $dbh $classes]} { > ns_puts "Class: ..." > set studen

Re: [AOLSERVER] ns_cache and virtual hosting ...

2003-03-15 Thread Jim Wilcoxson
Are the changes such that a cache can be either per-virtual-server or per-server? It might be useful to retain the ability to have a server-wide cache. > I sat down Friday afternoon with Jim's excellent short document > describing how to make a module virtual server aware, and after an hour > or

Re: [AOLSERVER] AOLServer 4.0 hanging when killed...

2003-01-27 Thread Jim Wilcoxson
We have shutdown problems all the time with 3.4.2. Just another data point. Jim > > --part1_ab.2896ff19.2b66f56c_boundary > Content-Type: text/plain; charset="US-ASCII" > Content-Transfer-Encoding: 7bit > > In a message dated 1/27/2003 3:36:18 PM Eastern Standard Time, > [EMAIL PROTECTED] writes

Re: [AOLSERVER] ns_mutex is likely causing our AOL web server to hung

2003-01-27 Thread Jim Wilcoxson
Put catches around your locked code and you may find a bug, for example, incrementing an array var that doesn't exist or unsetting an array var that doesn't exist. Without ns_mutex calls, the code may blow up but your server won't lock up. Jim > > This message is in MIME format. Since your mail

Re: [AOLSERVER] DB Pool and closed connections

2003-01-25 Thread Jim Wilcoxson
IMO, it would be nice to have a way to poll the server to see if the current connection has died. But killing threads immediately when that happens would be very bad. All kinds of things could be left in inconsistent states on complex sites. Jim > > On Fri, 2003-01-24 at 23:58, Andrew Piskorski

Re: [AOLSERVER] wierd log entries

2003-01-10 Thread Jim Wilcoxson
That's a server bug. It was mentioned a long time ago on the list... Jim > > What about the lack of a space before the 400? is that a buglet in the > nslog code? or some other issue I should be concerned with? > > - Original Message - > From: "Scott Goodwin" <[EMAIL PROTECTED]> > To: <

Re: [AOLSERVER] gzip compression

2003-01-09 Thread Jim Wilcoxson
I think it is browser-dependant whether gzip decompression is performed after all data is received. Here is a quote from the Mozilla site, at http://www.mozilla.org/projects/apache/gzip/ "The current Mozilla source already sends Accept-encoding: gzip and can do a streaming decompression of HTML

Re: [AOLSERVER] gzip compression

2003-01-05 Thread Jim Wilcoxson
Before investing a lot of time/energy into storing the gzip results, someone may want to do some benchmarks. For a low-volume site, nothing matters. On a high-volume site, storing a large cache of gzip results on disk will put more pressure on the memory subsystem. If someone decides that storin

Re: [AOLSERVER] gzip compression

2003-01-03 Thread Jim Wilcoxson
Happy New Year Nathan! Check here: http://www.rubylane.com/public/rlreturnz/rlreturnz.c If it has a performance impact, we have not noticed it. There are some browser issues, for example, with Netscape 3 on a framed site. My theory is that Netscape's gzip decompression routine has issues when m

Re: [AOLSERVER] Config File Improvements

2002-12-03 Thread Jim Wilcoxson
Here's an idea: make a directory like "config" for the nsd stuff. Have a main file there, plus a bunch of module config files. All of the module config files get sourced by a loop in the main file. This would eliminate having to list the modules in the main file and also have a config section for

Re: [AOLSERVER] ns_getform/form.tcl change

2002-11-24 Thread Jim Wilcoxson
I posted a change yesterday to form.tcl, the purpose being to ensure that temp files got deleted if the upload is aborted. But I goofed and changed ns_atclose to unlink; not good. Here is another diff. The idea is to unlink the main temp file right after creating it, before ns_conncptofp has a c

Re: [AOLSERVER] mix -g/-O among modules?

2002-11-24 Thread Jim Wilcoxson
I think that you will run into problems with optimization unless you use all the gcc options to tell it that statics are volatile. Most compilers will assume that statics within a C function can only be changed by that function, but that isn't true with multiple threads executing the code. We're

[AOLSERVER] ns_getform/form.tcl change

2002-11-23 Thread Jim Wilcoxson
During file uploads with mime/multipart, we've noticed that if a user aborts an upload, the temp files hang around. Here's a patch to modules/tcl/form.tcl that fixes this problem by unlinking the temp files immediately after they are created. This works on Unix, but may not be portable on other p

Re: [AOLSERVER] problems

2002-11-13 Thread Jim Wilcoxson
The "cd" TCL command does not work in AOLServer, because all threads share the same working directory. When executed in multiple threads simulataneously, you have a race condition. We do this in _init.tcl, the first modules we load with AS: rename cd {} That disables the cd command altogether,

Re: [AOLSERVER] AOLserver stats package test server available

2002-11-11 Thread Jim Wilcoxson
Very cool info! Thanks for the easy peek at them. -Jim > I've made Nathan's stats package available on a temporary server so you > can get a look at it.

Re: [AOLSERVER] nsv needs C API Re: [AOLSERVER] ns_set,

2002-11-10 Thread Jim Wilcoxson
> > On Saturday 09 November 2002 19:43, you wrote: > > > Since the TCL core already has all this stuff in it about binding TCL > > vars to C vars, it seems plausible to use it for ns_shares and get > > 7.6-like performance without needing traces. > > Ehm... the Tcl bindings *use* traces internally,

Re: [AOLSERVER] nsv needs C API Re: [AOLSERVER] ns_set,

2002-11-09 Thread Jim Wilcoxson
I looked a little at the TCL C binding mechanism, and it seemed like that would be a good way to do ns_shares. One problem I noticed is that there is no way for a TCL var to "not exist" if it is bound to a C variable, ie, [info exists blah] will always be true for a TCL var bound to a C var, but n

Re: [AOLSERVER] How I'll vote for core team members (long)

2002-11-08 Thread Jim Wilcoxson
> > This brings up another question: what constitutes a voting member? > > Does one company get 1 vote, or does each employee at a company get a > > vote? > > Each member of the core team should have a vote, regardless of company. I meant in the community, who gets a vote?

Re: [AOLSERVER] nsv needs C API Re: [AOLSERVER] ns_set,

2002-11-08 Thread Jim Wilcoxson
Hi - this sounds interesting. Can an ns_share emulation be implemented on top of this new shared var mechanism with good performance, i.e., at least equivalent to TCL7.6 ns_shares? Jim > > On Friday 08 November 2002 23:34, you wrote: > > Perhaps nsv should be replaced with the svar work Zoran ha

Re: [AOLSERVER] How I'll vote for core team members (long)

2002-11-08 Thread Jim Wilcoxson
Since AOL has already picked its representation, it seems to me they should not vote on the community half of the core team. Not that their votes would necessarily be wrong or bad or have any nefarious intention, but more in the interest of fairness, as has been said before. Just my opinion. Thi

Re: [AOLSERVER] URL case insensitivity.

2002-11-08 Thread Jim Wilcoxson
But in the problem definition, all files were stored in lowercase on disk. :) Jim > > On Friday, November 8, 2002, at 01:43 PM, Jim Wilcoxson wrote: > > > Here is a TCL hack to serve files w/o case sensitivity (not tested): > > > That works when the problem is people ent

Re: [AOLSERVER] URL case insensitivity.

2002-11-08 Thread Jim Wilcoxson
Here is a TCL hack to serve files w/o case sensitivity (not tested): ns_register_proc GET / servit ns_register_proc POST / servit ns_register_proc HEAD / servit proc servit {conn ignore} { set url [string tolower [ns_conn url]] if {[file exists [ns_info pageroot]$url]} { ns_returnfile 20

Re: [AOLSERVER] ns_set,

2002-11-08 Thread Jim Wilcoxson
Creating a TCL-accessible array in a C module is trival. Just pass the name of the TCL array variable to the C module, then in the C code, do: if (Tcl_SetVar2(interp, arrayname, subscript, val, TCL_LEAVE_ERR_MSG) == NULL) { return TCL_ERROR; } Args 2-4 are just simple strings. The array na

Re: [AOLSERVER] benchmarking aolserver (odd behavior)

2002-11-07 Thread Jim Wilcoxson
> In general, is it possible to change the AOLServer configuration at run > time by using the ns_section and ns_param commands? > > - Gabriel No, in general you cannot change an AS config at runtime by fiddling ns_param commands. These commands are all processed at startup. For example, when you

Re: [AOLSERVER] Responding to SourceForge-generated mail

2002-10-22 Thread Jim Wilcoxson
Has anyone ever though about using BBS software, like UBB or vBulletin? It's more like a community. SF is a development environment. Jim > > On Tuesday, October 22, 2002, at 10:51 AM, Scott S. Goodwin wrote: > > > I don't think anyone was suggested shutting down the AOLserver > > discussion list

Re: [AOLSERVER] Responding to SourceForge-generated mail

2002-10-22 Thread Jim Wilcoxson
For the folks who do not like the SF email on the regular AS discussion list, shutting down the regular list and making it SF-only would be exactly the wrong thing to do. Personally, I wouldn't mind getting a SF email summary once per week on this list, or even better, a web link to a summary page

Re: [AOLSERVER] Responding to SourceForge-generated mail

2002-10-21 Thread Jim Wilcoxson
Yeah, I agree. Get a flood of these is not much fun. I apologize for not posting on SF. I did go there, couldn't figure out what the hell to do (even though I know I am registered there), probably couldn't remember the password I registered with anyway, so I punted and just replied to the email.

Re: [AOLSERVER] [ aolserver-Support Requests-626122 ] AOLserver 3.4.2

2002-10-20 Thread Jim Wilcoxson
Do you use ns_share arrays, and are you using TCl 7.6? If so, there is a critical bug in the server. The following code will bomb the server at random, because of a race condition: ns_share x set x(1) 1 if {[info exists x(2)]} { } If you execute this 1000x per second or so, the server will imme

Re: [AOLSERVER] Module arrogance

2002-10-18 Thread Jim Wilcoxson
> As for database drivers, I think it's never acceptable for a driver to > fatal because of a failed connection -- there's already a well-established > mechanism to report and detect connection failures at the time of a "ns_db > gethandle", and if that fails, you can exit yourself; if you want to m

Re: [AOLSERVER] Module arrogance

2002-10-18 Thread Jim Wilcoxson
Personally, I like hard failures. If I configure a database in my nsd.tcl, it seems obvious that I want a database. If the server starts anyway without one, then instead of having an immediate, obvious error to handle, I have a subtle one. I go to my home page, and the page comes back, so I assu

Re: [AOLSERVER] Limiting simultaneous requests from one ip-address

2002-10-14 Thread Jim Wilcoxson
> the heavy user. If no one else is using the server, what's the problem? Just one example: I don't like paying for someone on a cable modem to try out his new download toy by starting a download of our site before he goes to bed, only to wakeup and find out it ran all night and still didn't fini

Re: [AOLSERVER] Limiting simultaneous requests from one ip-address

2002-10-14 Thread Jim Wilcoxson
> I have a lame hack I do which is to check the ns_server information to see if there >is already a process running from the peer address via a filter. It works for me >since mine is an internal app and we have no proxy. The problem with this approach IMO is that there are no options at that p

Re: [AOLSERVER] Limiting simultaneous requests from one ip-address

2002-10-14 Thread Jim Wilcoxson
I don't know how to do it, but it would be *really* cool if IP addresses could be rate-limited and serialized inside the AOLServer core without having to resort to proxying every incoming connection through another piece of software. Several things would be needed: 1. An interface to set/query t

Re: [AOLSERVER] Wierd segfault

2002-10-13 Thread Jim Wilcoxson
> segfault case. What is surprising is that you have a machine with three > other AOLserver instances and not all of them exhibit the problem. That's > just goofy. The resolver library could be dynamically linked in some of the server builds and statically linked in others. I dunno - just a gu

Re: [AOLSERVER] NTPL on Linux

2002-09-23 Thread Jim Wilcoxson
What I would really like to see is a better wakeup mechanism so that all of the threads don't wake up at once when a new request comes in. I think that's how it works now in many cases, though don't know for sure. The other thing that is a problem is that threads seem to service requests in round

Re: [AOLSERVER] CGI error

2002-09-18 Thread Jim Wilcoxson
It's probably the same as "ns_getform failed: Success", which we see on our site. I think the error code mapping is incorrect in AS, at least for Linux. Jim > > Can anyone explain this error message for me? > > [18/Sep/2002:11:23:34][1790.9221][-conn2-] Error: nscgi: wait for > /usr/bin/perl fa

Re: [AOLSERVER] Potential problems using open |?

2002-09-07 Thread Jim Wilcoxson
We [exec a 160K program about once a second with no ill effects. Very very rarely we have had a stuck exec process that goes CPU bound. I'm assuming it's some kind of race condition in the start/stop interface. So we run a monitor program to watch for this and kill it. Good luck, Jim > > Hi. >

Re: [AOLSERVER] ns_get_multipart_formdata

2002-09-04 Thread Jim Wilcoxson
use ns_getform & see documentation Jim > > Will someone give me a working example of how to upload a file? The > example in the Man Page does not work. It returns an error message: > > wrong # of args: should be "ns_get_multipart_formdata connId key fileId ? > formdataSet? >

Re: [AOLSERVER] ns_queryget problem

2002-09-02 Thread Jim Wilcoxson
This problem is occurring in ns_getform, so the relevant code is: set fp "" while {$fp == ""} { set tmpfile [ns_tmpnam] set fp [ns_openexcl $tmpfile] } ns_conncptofp $fp The disk is not full and this problem is very

Re: [AOLSERVER]

2002-08-31 Thread Jim Wilcoxson
IMO, who cares about being able to crash AS this way? The only scenario I can see it being important is for a hosting service that lets users interact directly with TCL. I doubt there are very many of those. And if it's a big concern there, those sites can easily redefine ns_rwlock to add array

Re: [AOLSERVER] ns_queryget problem

2002-08-26 Thread Jim Wilcoxson
For what it's worth, we're not using any virtual server modules and see this problem. Jim > > Interesting you link this to virtual servers What is your virtual > server technology? > > > Jerry > > At 03:32 AM 8/24/2002, you wrote: > >dear all, > > > >i got this error message after i setting

Re: [AOLSERVER] Ns_WriteConn implementation?

2002-08-14 Thread Jim Wilcoxson
I just looked at the socket code, the main part being in nsd/sock.c: --- Ns_SockSend(SOCKET sock, void *buf, int towrite, int timeout) { int nwrote; nwrote = send(sock, buf, towrite, 0); if (nwrote == -1 && ns_sockerrno == EWOULDBLOCK && Ns_SockWait(sock, NS_SOCK_WRITE

Re: [AOLSERVER] connection thread keeps running?

2002-08-14 Thread Jim Wilcoxson
It would be nice if [ns_conn isconnected] did that, and there was another routine [ns_conn isconn] to tell whether this thread is associated with a connection at all (like the current isconnected does). We usually just do [ns_conn blah] inside a catch to handle the case of calling it from a sched

Re: [AOLSERVER] Seeking ns_cache configuration advice

2002-07-30 Thread Jim Wilcoxson
Thanks Rob. -J > > +-- On Jul 30, Jim Wilcoxson said: > > I'm not complaining, because this isn't particularly important to me, > > but I can't imagine a relatively new AOLServer developer figuring any > > of this out. I'm lost, and I&#

Re: [AOLSERVER] Seeking ns_cache configuration advice

2002-07-30 Thread Jim Wilcoxson
lines of code, so I gave up. > > > > > Jim, are you aware that AOLserver 3 has C API for caches that > > automatically flush outdated entries and automatically evict LRU entries > > to limit memory use, and that there's an ns_cache module that provides a > >

  1   2   3   >