supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "George Georgalis" <george@galis.org>
Subject: Re: apache2 logs -> svlogd
Date: Wed, 15 Feb 2006 10:09:46 -0500	[thread overview]
Message-ID: <20060215150946.GC15560@sta.duo> (raw)
In-Reply-To: <20060214155838.GB29956@home.power>

On Tue, Feb 14, 2006 at 05:58:38PM +0200, Alex Efros wrote:
>On Tue, Feb 14, 2006 at 08:17:06PM +0530, Joshua N Pritikin wrote:
>> On Tue, Feb 14, 2006 at 09:25:32AM -0500, George Georgalis wrote:
>> > >Recommended solution was put 'sleep 1' before svlogd, but for me it's a
>> > >little ugly and unreliable.

I quoted that; I didn't say it, though I was quoted as doing so a
few messages back.  It was the context of my question. 'sleep 1'
does seem reasonable to me, though not correct and therefore not
reliable... the respawn svlogd, as required, approach seems hardly
justified though.

Yet, I don't completely understand why it is proported to work --
part of the reason I quoted it. (I have an unrelated problem below.)

>> What isn't ugly about creating named pipes?  I don't think the named
>> pipe solution wins the beauty contest either.

I'm curious about Alex's runscript:

---[ /service/apache2_access_log/run ]---                                                                           
#!/bin/sh                                                                                                           
exec >&2                                                                                                            
exec svlogd /var/log/apache2/access/   <>/var/log/apache2/access_log                                                
---[ /service/apache2_access_log/run ]---    

because I don't understand the use of '<>'. Any comments or links
on this are welcome -- though it doesn't address my needs, I use a
standard access logfile for each virtual domain, and would like
to use a svlogd for each domain's error log; both cases to manage
rotation. Not sure an access (or error) service will help me,
besides the apache logfile is being written (in addition) which is
what I thought was being avoided by using svlogd...

>Named pipes... In short, I think named pipes is better because:
>- this is universal solution which can be used for any daemon which prefer
>  to write log files itself, for example: Xorg :) , xdm, ntpd, emerge :) ,
>  iptraf, mysql, oops (webproxy), samba... maybe some of them can be
>  configured to use svlogd, but not all (so SINGLE UNIVERSAL UGLY solution
>  is much better than number of different custom more-or-less ugly
>  solutions)
>- svlogd for named pipe supervised by runsv and won't restart with it
>  service - no problems with sleep 1 and so
>- svlogd can be reconfigured&restarted without restarting service(apache)
>- you can have many services sending their logs into same named pipe
>  (can't imagine how this can be used in real world yet :))
>- ... anything else?

...I think we have a different set of problems and/or concerns...

in any event, I won't be doing any apache2 svlogd in the near future,
per my unanswered post (log to pipe not working in pkgsrc apache2) on
the pkgsrc list, below.

>> Ultimately we may need to go beat up apache developers.  ;-)

Count me in!

Cheers,
// George


----- Forwarded message from George Georgalis <george@galis.org> -----

Date: Tue, 14 Feb 2006 13:21:25 -0500
Message-ID: <20060214182125.GD1378@sta.duo>
Return-Path: bounces-tech-pkg-owner-george=galis.org@NetBSD.org
From: George Georgalis <george@galis.org>
To: tech-pkg@netbsd.org
Subject: www/apache2 not accepting command for ErrorLog

The pkgsrc apache2 is not happy with a command for ErrorLog,
as documented here

http://httpd.apache.org/docs/2.2/mod/core.html#errorlog

It surprises me that this would be broken. Is there something wrong
with the package? With the original source? Or my execution?

In this httpd.conf fragment, the former works

#ErrorLog /tmp/apache2.ErrorLog
ErrorLog "|/bin/cat >>/tmp/apache2.ErrorLog"

but the latter causes apache to exit with the error:

[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed

I'm quite certain I have free space and inodes, seems like apache2
is trying to do locking on the exec? but what does mod_rewrite
have to do with it? I don't load it.  My configuration is generic
accept for the invocation

/usr/pkg/sbin/httpd -DNO_DETACH -f /usr/local/etc/apache2/httpd.conf -e debug -E /tmp/apache.start.err

and a very standard NameVirtualHost.

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org


----- End forwarded message -----

-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org


  reply	other threads:[~2006-02-15 15:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13 17:38 Alex Efros
2006-02-13 18:04 ` Torne Wuff
2006-02-13 18:25   ` Alex Efros
2006-02-14 14:25     ` George Georgalis
2006-02-14 14:47       ` Joshua N Pritikin
2006-02-14 15:58         ` Alex Efros
2006-02-15 15:09           ` George Georgalis [this message]
2006-02-23 13:36             ` Dean Hall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060215150946.GC15560@sta.duo \
    --to=george@galis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).