Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread Mladen Turk
William A. Rowe, Jr. wrote: Mladen Turk wrote: Code was testes both on windows and linux and it works like a charm (rotation is done at exact time regardless of log events). Foolish question, but rather than waking up every second, isn't it more rational to compute the expiry of the current fi

Re: mod_substitute memory problem

2009-06-10 Thread Ruediger Pluem
On 06/10/2009 06:18 PM, Nick Gearls wrote: > Hi Nick, > > Do you mean that mod_sed should be used instead of mod_substitute? > Because it is more complete, or more mature? I only need the substitution. > > About the flattening: is the q flag only needed if you want to use two > subst on the sam

Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread William A. Rowe, Jr.
Mladen Turk wrote: > Dan Poirier wrote: >> Would wait_for_io_or_timeout() be a good candidate for apr? >> > > There is apr_wait_for_io_or_timeout but it uses the > apr_file_t->timeout which can be set only for pipes > and sockets. > > Also the Win32 code will work only for stdhandles because > th

Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread William A. Rowe, Jr.
Mladen Turk wrote: > > Code was testes both on windows and linux and it works like > a charm (rotation is done at exact time regardless of log events). Foolish question, but rather than waking up every second, isn't it more rational to compute the expiry of the current file and timeout for that p

Re: mod_substitute memory problem

2009-06-10 Thread William A. Rowe, Jr.
Nick Gearls wrote: > > If using the "q" switch to not flatten the buckets, it uses almost no > memory. Btw, it correctly handles more 60 substitutions on the same line > (some shorter, some longer) without the q flag !?! When exactly is this > flag needed? The "q" switch causes the pattern to fai

Re: mod_substitute memory problem

2009-06-10 Thread Nick Gearls
Hi Nick, Do you mean that mod_sed should be used instead of mod_substitute? Because it is more complete, or more mature? I only need the substitution. About the flattening: is the q flag only needed if you want to use two subst on the same line with overlapping between them? Thanks, Nick N

Re: mod_substitute memory problem

2009-06-10 Thread Nick Gearls
The problem is real. I have an application which generates one line of about 300 KB :-( In this case, Apache eats up all the memory (about 1 GB), and never gives it back to the OS - game over - reboot ! How could this be solved? Thanks, Nick Dan Poirier wrote: Nick Gearls writes: There

Re: Some ramblings on httpd config

2009-06-10 Thread Akins, Brian
On 6/10/09 10:21 AM, "Dan Poirier" wrote: >> That sounds a whole lot like using the config as a runtime. > > I'm not sure I follow that. I do like that the config would still look > a lot like it does now, only more flexible. Even if we kept the same general syntax as now, if we introduce var

Re: Some ramblings on httpd config

2009-06-10 Thread Dan Poirier
"Akins, Brian" writes: > On 6/10/09 8:52 AM, "Rich Bowen" wrote: > >> If we had a standard set of variables (like, say, HOSTNAME or whatever) that >> could be interpolated into config directives, as well as a standard way to do >> variable assignment and backreferences, that would solve a whole

Re: Some ramblings on httpd config

2009-06-10 Thread Akins, Brian
On 6/10/09 8:52 AM, "Rich Bowen" wrote: > Or something like that that's sufficiently like what we have now to be easy to > learn, but sufficiently different to be harder to get wrong, and a whole heck > of a lot easier to do dynamic vhosts. I think Lua (or whatever) could include enough "user fr

Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread Mladen Turk
Plüm, Rüdiger, VF-Group wrote: Any particular reason why not using apr_wait_for_io_or_timeout at least on unix? See the answer I gave to Dan. It uses file internal timeout which we cannot set, so no it cannot be used. Regards -- ^(TM)

Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread Mladen Turk
Dan Poirier wrote: Would wait_for_io_or_timeout() be a good candidate for apr? There is apr_wait_for_io_or_timeout but it uses the apr_file_t->timeout which can be set only for pipes and sockets. Also the Win32 code will work only for stdhandles because they are pipes. In essence the answer

Re: Some ramblings on httpd config

2009-06-10 Thread Rich Bowen
On Jun 9, 2009, at 08:49, Akins, Brian wrote: Some pseudo request processing code to do same thing: if listening_port == 80 then if r.hostname == 'www.foo.com' then elseif r.hostname =~ /www\d.bar.[org|net]/ end end As long as we're talking about exposing nifty synta

Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread Plüm, Rüdiger, VF-Group
Any particular reason why not using apr_wait_for_io_or_timeout at least on unix? Regards Rüdiger > -Ursprüngliche Nachricht- > Von: Mladen Turk > Gesendet: Mittwoch, 10. Juni 2009 14:24 > An: dev@httpd.apache.org > Betreff: Re: rotatelogs - Adding timeout for reading from stdin > > Wi

Re: mod_substitute memory problem

2009-06-10 Thread Nick Kew
On Wed, 10 Jun 2009 13:11:16 +0200 Nick Gearls wrote: > 2. The memory is not freeed at the end of the HTTP request. > Maybe is it due to Keep-alive? It's recycled within the server. > If using the "q" switch to not flatten the buckets, it uses almost no > memory. Btw, it correctly handles more

Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread Dan Poirier
Would wait_for_io_or_timeout() be a good candidate for apr? -- Dan Poirier

Re: rotatelogs - Adding timeout for reading from stdin

2009-06-10 Thread Mladen Turk
William A. Rowe, Jr. wrote: Mladen Turk wrote: I'd leave rotatelogs alone, please. Its design is not flawed. But I think Jim was working on something which would release the file just as soon as its time is up, and that is useful across all of the architectures, not windows specific. Attach

Re: mod_substitute memory problem

2009-06-10 Thread Dan Poirier
Nick Gearls writes: > There seems to be a memory problem when substituing something on very > long lines (several hundreds KB). this problem is different from bug > 44948 (I applied this patch). > > When using something like "Substitute s/string1/string2/" on a 300 KB > line with 30 times "string

Re: error: 'OPT_INCNOEXEC' undeclared

2009-06-10 Thread Oden Eriksson
> On Tue, Jun 9, 2009 at 10:55 AM, Oden Eriksson > wrote: > >> Hello. >> >> The CVE-2009-1195 fix broke the mod_perl build: >> >> modperl_config.c:525: error: 'OPT_INCNOEXEC' undeclared (first use in >> this >> function) >> >> I saw http://svn.apache.org/viewvc?view=rev&revision=779472 addresses >>

mod_substitute memory problem

2009-06-10 Thread Nick Gearls
Hello, There seems to be a memory problem when substituing something on very long lines (several hundreds KB). this problem is different from bug 44948 (I applied this patch). When using something like "Substitute s/string1/string2/" on a 300 KB line with 30 times "string1" on the line, ther