supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Scott Gifford <sgifford@suspectclass.com>
To: Robin Bowes <robin-lists@robinbowes.com>
Cc: supervision@list.skarnet.org
Subject: Re: supervising an apache RewriteMap program?
Date: Sat, 02 Jun 2007 17:00:46 -0400	[thread overview]
Message-ID: <lyejkurs01.fsf@gfn.org> (raw)
In-Reply-To: <46424B2D.3010109@robinbowes.com> (Robin Bowes's message of "Wed, 09 May 2007 23:29:01 +0100")

Robin Bowes <robin-lists@robinbowes.com> writes:

> I'm using perl script as an Apache RewriteMap program [1]

[...]

> I'm wondering, could I use supervise or runsv to make sure the rewrite
> map program is restarted?

Perhaps, but the handy things supervise does (like redirect file
descriptors) would be more of a hindrance than a help here, so it
would probably be much easier to wrap your script in another Perl
script that did something like:

  while(1) {
    system("/path/to/real/program");
  }

That's still not perfect; a better solution would patch Apache to
restart the program (as Charlie suggests), or else to send requests
over a socket, which could be listened to by a supervised daemon.

Good luck!

----Scott.


      parent reply	other threads:[~2007-06-02 21:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09 22:29 Robin Bowes
2007-06-02 16:50 ` Charlie Brady
2007-06-02 19:06 ` Robin Bowes
2007-06-02 21:00 ` Scott Gifford [this message]

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=lyejkurs01.fsf@gfn.org \
    --to=sgifford@suspectclass.com \
    --cc=robin-lists@robinbowes.com \
    --cc=supervision@list.skarnet.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).