From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/621 Path: main.gmane.org!not-for-mail From: Lloyd Zusman Newsgroups: gmane.comp.sysutils.supervision.general Subject: When running ruby scripts, runsv tightly loops Date: Sun, 07 Nov 2004 00:10:38 -0500 Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1099804319 399 80.91.229.6 (7 Nov 2004 05:11:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Nov 2004 05:11:59 +0000 (UTC) Original-X-From: supervision-return-860-gcsg-supervision=m.gmane.org@list.skarnet.org Sun Nov 07 06:11:48 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14] ident=qmailr) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1CQfL9-0003hf-00 for ; Sun, 07 Nov 2004 06:11:47 +0100 Original-Received: (qmail 21448 invoked by uid 76); 7 Nov 2004 05:12:08 -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 21442 invoked from network); 7 Nov 2004 05:12:08 -0000 X-Injected-Via-Gmane: http://gmane.org/ Original-To: supervision@list.skarnet.org Original-Lines: 41 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: hippo.asfast.net User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:2NUsbKuAJHUO8zg1sEz8XMK+6OQ= Original-Sender: news Xref: main.gmane.org gmane.comp.sysutils.supervision.general:621 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:621 I'm successfully using runit for managing a number of daemons. However, I have encountered a problem when the daemon is a ruby script. It seems like no matter what the script is doing, the runsv process that is managing the script seems to be running in a tight loop and taking up a high percentage of my cpu. This even occurs during a do-nothing ruby program, such as the following: #!/usr/bin/ruby while true sleep(10) end Assuming that this is called '/usr/local/bin/myscript', the 'run' script looks like this: #!/bin/sh exec 2>&1 exec /usr/local/bin/myscript exit 1 The 'myscript' process itself takes up a miniscule amount of resources; only the 'runit' script which is managing it seems to be looping. Has anyone else run into this problem with ruby scripts and runit? By the way, I don't see this problem with python or perl scripts. Could there be something about the ruby interpreter itself which could be causing runsv to behave this way? If so, can anyone suggest a fix for this? Thanks in advance. -- Lloyd Zusman ljz@asfast.com God bless you.