supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* When running ruby scripts, runsv tightly loops
@ 2004-11-07  5:10 Lloyd Zusman
  2004-11-07  5:32 ` Never mind ... (Was: When running ruby scripts, runsv tightly loops) Lloyd Zusman
  0 siblings, 1 reply; 4+ messages in thread
From: Lloyd Zusman @ 2004-11-07  5:10 UTC (permalink / raw)


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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-07 20:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-07  5:10 When running ruby scripts, runsv tightly loops Lloyd Zusman
2004-11-07  5:32 ` Never mind ... (Was: When running ruby scripts, runsv tightly loops) Lloyd Zusman
2004-11-07 13:55   ` Gerrit Pape
2004-11-07 20:59     ` Never mind Lloyd Zusman

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).