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
1
vote
2 answers

God monitoring: Delay start after process exit

I am monitoring a ruby program with god. When the ruby program exits, I want to wait for 10 seconds until it is started again. When I use grace, after the process exits, the process is immediately started again, but god waits for the grace period of…
Rainer Schwarze
  • 4,725
  • 1
  • 27
  • 49
1
vote
1 answer

Loading God scripts on startup - requires global gems?

I use God to watch over my Ruby APIs and services. I have created Init scripts to start up these services when the server boots. Doing this has led me to a couple of questions. Firstly I have to have the scripts running as root? I found that as it…
Vade
  • 2,009
  • 6
  • 24
  • 32
1
vote
1 answer

God - custom code on process exits

Is it possible to execute custom code when God restarts a process. Please see sample below of what I mean. When watch transitions from :up to :start (process restarted), we want to send a log to syslog at :error level. applog is a method defined in…
sumit
  • 436
  • 3
  • 15
1
vote
2 answers

GOD and environment variables : How to manage credentials?

I want to monitor a ruby script with god and pass AWS credentials as environment variables, what's the recommended way to do this ? My current approach : I would like to commit the god config file with source code to github, therefore i can't set…
vdaubry
  • 11,369
  • 7
  • 54
  • 76
1
vote
2 answers

Will defunct processes prevent proper running of other processes?

My mongrels were not responding, and neither god restart nor cluster restart made a big difference. I dug a little deeper, than i realized that i had plenty of zombie processes. app 29607 27948 0 19:45 ? 00:00:00 [mongrel_rails] app …
meow
  • 27,476
  • 33
  • 116
  • 177
1
vote
0 answers

Using god to monitor unicorn; "god log unicorn" gets stuck

I am on CentOS 6.5 and running god to monitor unicorn which is being used with nginx to deploy a ruby on rails application. I am able to start god and unicorn without issue but when I run the command god log unicorn I get the "Please wait..."…
user3195786
  • 727
  • 1
  • 10
  • 19
1
vote
1 answer

God configuration with keepalive and interval

I have following god configuration file. Here I have couple of question, can you please help me: 1 - what is will w.interval and c.interval will do? 2 - I want to keep my daemon alive (w.keepalive), how can I add it in my code? One more thing here…
Sandeep
  • 353
  • 1
  • 4
  • 11
1
vote
0 answers

Is there a way to configure god to restart a watch every x amount of time?

I have a little script streaming data from Twitter and feeding it to another application. I am using for that the official twitter gem in its 5.0.0.rc.1 release with the streaming feature being flagged as experimental, which is fine with me. It's…
The Mighty Rubber Duck
  • 4,388
  • 5
  • 28
  • 27
1
vote
1 answer

Trying to understand GOD rb

I'm facing few confusion with GOD documentation Firstly my configuration script look like this DIRECTORY = "/Users/joshianiket22/myProject/god_script" God.pid_file_directory = DIRECTORY God.watch do |w| w.name = "mess" w.start = "ruby…
Viren
  • 5,812
  • 6
  • 45
  • 98
1
vote
1 answer

God cannot start redis server. Getting this error: `/var/run/redis/redis-server.pid': Permission denied

I'm trying to monitor a redis server with god (ruby gem). I changed the PID file path in /etc/redis/redis.conf to a rails app temp folder of the user deploying my app (using capistrano), and in the redis.god file I added the line "w.pid_file= ..."…
user1370897
  • 503
  • 8
  • 15
1
vote
2 answers

God configuration file to monitor existing processes?

I am monitoring my redis server using God (a Ruby gem). However, my existing server may already has an instance of redis up. How can I be sure it monitors the existing Redis server process that is already up? This is my God file for…
Henley
  • 21,258
  • 32
  • 119
  • 207
1
vote
1 answer

Set Process Start Sequence with God Gem

Is it possible to have God start two processes in sequence? I am using Sidekiq which relies on Redis. I would like to start up Redis, then start up Sidekiq, and I have two separate watches set up which work fine independently, however when I…
Undistraction
  • 42,754
  • 56
  • 195
  • 331
1
vote
1 answer

one god for different rubies with rvm

I have two apps on my machine. Each app (server) has it's own gemset and works on a different ruby version. I will manage those apps with god which is installed in it's own gemset. My god config file config.god looks like this: God.watch do |w| …
czerasz
  • 13,682
  • 9
  • 53
  • 63
1
vote
1 answer

Use ENV variables in god config file

I want to use environement varible in my god config file. I am using queue = ENV['ENCODE_QUEUE'] || "encoding_abc" and setting ENCODE_QUEUE using export ENCODE_QUEUE="enocding_xyz" in ~/.bashrc file. but the god service always uses…
d33pika
  • 1,997
  • 14
  • 24
1
vote
3 answers

Auto restart rake task if it give exception

I have a rake task that must be always run. But sometimes this task can fail. And I need auto restart it? I think I need use God gem or maybe there are other ways to solve this problem?
zolter
  • 7,070
  • 3
  • 37
  • 51
1 2 3
8 9