From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1425 Path: news.gmane.org!not-for-mail From: Scott Gifford Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: supervising an apache RewriteMap program? Date: Sat, 02 Jun 2007 17:00:46 -0400 Message-ID: References: <46424B2D.3010109@robinbowes.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1180820783 10468 80.91.229.12 (2 Jun 2007 21:46:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Jun 2007 21:46:23 +0000 (UTC) Cc: supervision@list.skarnet.org To: Robin Bowes Original-X-From: supervision-return-1662-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jun 02 23:46:22 2007 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1HubQT-0003TA-M4 for gcsg-supervision@gmane.org; Sat, 02 Jun 2007 23:46:21 +0200 Original-Received: (qmail 8568 invoked by uid 76); 2 Jun 2007 21:46:42 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 8562 invoked from network); 2 Jun 2007 21:46:42 -0000 X-Delivered-To: supervision@list.skarnet.org X-Authentication-Warning: gfn.org: swgsh set sender to sgifford@suspectclass.com using -f In-Reply-To: <46424B2D.3010109@robinbowes.com> (Robin Bowes's message of "Wed, 09 May 2007 23:29:01 +0100") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) X-Scanned-By: MIMEDefang 2.35 X-Scanned-By: milter-date/0.6.73 (gfn.org [205.145.130.34]); Sat, 02 Jun 2007 17:46:18 -0400 X-Spam-Flag: NO Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1425 Archived-At: Robin Bowes 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.