Questions tagged [god]

God is a Ruby process monitoring framework designed to keep processes up and running.

God manages the entire lifecycle of a running process. It handles starting, stopping, and restarting process, and it also monitors the processes and restarts them if they exit or an error occurs. Similar tools are runit and monit.

The source code and documentation can be found on God's rubyforge page or on Ruby gems. The current version is 0.13.2.

121 questions
74
votes
13 answers

How to monitor delayed_job with monit

Are there any examples on the web of how to monitor delayed_job with Monit? Everything I can find uses God, but I refuse to use God since long running processes in Ruby generally suck. (The most current post in the God mailing list? God Memory…
Luke Francl
  • 31,028
  • 18
  • 69
  • 91
59
votes
6 answers

God vs. Monit for process monitoring

Which one to use for process monitoring and why?
Milan Novota
  • 15,506
  • 7
  • 54
  • 62
42
votes
3 answers

Using God to monitor Unicorn - Start exited with non-zero code = 1

I am working on a God script to monitor my Unicorns. I started with GitHub's examples script and have been modifying it to match my server configuration. Once God is running, commands such as god stop unicorn and god restart unicorn work just…
mindtonic
  • 1,385
  • 2
  • 14
  • 24
24
votes
4 answers

God starts too many processes

I have a god script that is supposed to keep an eye on two stalker processes. The problem is that after 24h it starts way too many processes. This is the god script. rails_root = File.expand_path("../..", __FILE__) 2.times do |n| God.watch do…
Linus Oleander
  • 17,746
  • 15
  • 69
  • 102
13
votes
2 answers

How to stop God from leaving stale Resque worker processes?

I'm trying to understand how to monitor the resque worker for travis-ci with god in such a way that stopping the resque watch via god won't leave a stale worker process. In the following I'm talking about the worker process, not forked job child…
svenfuchs
  • 683
  • 6
  • 11
11
votes
2 answers

Using god only to kill

I serve my software using passenger. It spawns many ruby processes. Sometimes one of these rubies becomes bloated and I want it to die. I was hoping to use god to that intent. My idea was to monitor all these rubies and if it is consuming more than…
Ricardo Acras
  • 35,784
  • 16
  • 71
  • 112
10
votes
1 answer

God won't register a running custom service

I've got a rails website and a small minecraft server running on a linode vps. I'm running minecraft as a custom service off of a ram server based on an init.d file. Since I'm using God to monitor my rails website I thought I'd use it for minecraft…
chrisk
  • 235
  • 3
  • 6
9
votes
4 answers

How can I keep a Passenger Standalone up even after a restart?

I have a few apps running rails 3 on ruby 1.9.2 and deployed on a Ubuntu 10.04 LTS machine using nginx + passenger. Now, I need to add a new app that runs on ruby 1.8.7 (REE) and Rails 2. I accomplished to do that with RVM, Passenger Standalone and…
Pablo B.
  • 1,823
  • 1
  • 17
  • 27
8
votes
1 answer

god doesn't stop unicorn

I have this file rails_env = ENV['RAILS_ENV'] || 'development' rails_root = ENV['RAILS_ROOT'] || "/home/luiz/rails_dev/api" God.watch do |w| w.name = "unicorn" w.interval = 30.seconds # default # unicorn needs to be run from the rails root …
Luiz E.
  • 6,769
  • 10
  • 58
  • 98
7
votes
4 answers

how can run rake resque:scheduler in daemon mode

I am using resque:scheduler gem in my rails 3 application. How can start rake resque:scheduler in daemon mode. and if you know then please let me know, How can I configure this task in GOD script?
Raghvendra Parashar
  • 3,883
  • 1
  • 23
  • 36
6
votes
1 answer

God stop resque workers rake

I am using Resque on a production website. When I deploy, I want GOD to stop all of the workers and then restart them since sometimes we change the code of a class and requeue the failed jobs. The problem is, that when I do god stop resque, the…
KensoDev
  • 3,285
  • 21
  • 38
5
votes
3 answers

restart all god tasks

Here's the description for god's restart command: restart . The builtin init script does a kill, followed by a start. Is there really no built-in way to send a restart command to all watches whether they are grouped or not?
m33lky
  • 7,055
  • 9
  • 41
  • 48
4
votes
3 answers

Ensure that certain processes are running when my Rails app loads

I want to ensure that certain processes like Sunspot Solr search and delayed_job are running when my Rails 3 app initializes or loads. I'm somewhat of a noob and from what I can tell, I could write a custom initializer or use a process monitoring…
lightyrs
  • 2,809
  • 2
  • 29
  • 32
4
votes
1 answer

Logging God process to STDOUT instead of a file

I have a rails application that uses Redis, Resque worker and scheduler. I'm using God to monitor both the worker and the scheduler. That part is working. What I need to know is if there's a way to output Resque worker and scheduler logs to STDOUT…
Isay Sosa
  • 41
  • 2
4
votes
2 answers

God not running: The server is not available (or you do not have permissions to access it)

I'm attempting to get god to start up my resque queue. However when I run god load config/resque.god it returns The server is not available (or you do not have permissions to access it) This is my resque.god file: rails_env = ENV['RAILS_ENV'] ||…
Andrew Lynch
  • 1,297
  • 3
  • 14
  • 25
1
2 3
8 9