Use Monit with Rails, not God
First, let me get a few things off my chest about God (the process monitor, I'm not being religious here)
"God - Process Monitoring Done Horribly Wrong"
"God (like monit, but doesn't work)"
Ok, I'm here to say that I hate the process monitor called God. Why? Because contrary to what Tom Preston-Werner says, it doesn't work and its not awesome. Where do I start?
Call a turd a turd
I have a serious problem with people in the Ruby community that throw a piece of crap, half baked open-source product out there, write about how "awesome" it is, build a lot of hype around it, and waste a lot of other peoples time for them to learn that the damn thing doesn't "just work". I don't care if something is version 0.0.5 and has serious problems, but call a turd a turd, not a Cadillac with shiney rims.
Can't stop (or start) daemons properly
Good luck wiring up God on Ubuntu to start a daemonized thin server. For some reason, thin exits with an exit code other than 0. Fine, ok, I understand that. That means I should be able to run thin without daemonizing it and have god daemonize for me, right? Nope, that doesn't work either. When you try to restart or stop a non-daemonized process in god it just won't work. Even if you manage getting a daemonized process running, God sometimes forgets about the pid and stops monitoring the process.
Straw buckets are leaky
Ruby leaks. God is written in ruby. If you run God long enough, it will run out of memory and stop working properly. In all fairness, this is not Tom Preston-Werner's fault. He spent a lot of time trying to minimize the leakage in God but its simply not possible in Ruby. Monit was written properly in C meaning it won't leak like a long-running Ruby application.
God is dead
The last commit to God on github was in February during the time this article went to Posterous. That means it has been over 2 months that god couldn't stop or restart a non-daemonized process. That seems like a serious bug that should be fixed pretty fast.
---
A dissection of bullshit
Just to drive this point home, I looked through the god website and found a few good quotes:
"God (like monit, only awesome)" - What the fuck does this mean? I'm not sure what's wrong with monit. Sure the configuration files seem a bit verbose if you have to monitor and bunch of servers, but one can get around this with some simple ruby code and ERB templates to generate the monitrc file. At least monit works.
"God is an easy to configure, easy to extend monitoring framework written in Ruby." - I don't trust people that sprinkle the word "easy" all over their software. When was the last time you trusted the phrase "easy to use" when evaluating a software package? This is something the end user should decide and is better left unsaid by the software developer. For me, god was impossible to use.
"FINALLY, A CONFIG FILE THAT MAKES SENSE" - Oh really? A giant ass ruby configuration file makes more sense than a monit configuration file? I beg the differ; monit has more documentation and is surprisingly laconic when compared to a god configuration file. With monit, you don't have to deal with nested blocks.
"That's it! Simple, huh?" - Yeah, so simple that it only takes 6 months to figure out that God doesn't actually work.
Tom, please tone down the hype on the http://god.rubyforge.org/ website and be more forthcoming about disclosing all of the issues that come with god. You make it look too easy, suck people in, and waste a lot of their time and energy. If you don't have time to maintain god thats understandable, but disclose that as well.
If there is one thing you walk away with from this post its that you do not use god to monitor your server processes. If you believe the Kool-aid on the god website you're in for a rough time. Consider monit, or any other process monitor that is not written in Ruby.




Comments 26 Comments
Really people, open source software is out there to improve your life. There are never any guarantees that it will work and in return you never have to pay a dime. I wish more people would understand that trade.
But yeah, not really stopping process on stop, and the crazy memory leaks (why would a monitoring utility take 500meg of memory after a week or two of usage?) mean Brad is just speaking the truth.
Brad, hook us up with some monit start/stop/monitor scripts. ;-)
I have a problem with people who are not forthcoming about the shortfalls of their projects and end up wasting a lot of peoples' time. Tom presents a one-sided picture of how "awesome" God is when it has some serious flaws. To be more productive and advance God, he could prominently list these flaws on the God website and look to the community for answers.
Honestly, I wrote god one afternoon after monit made me angry enough to take a stab at process monitoring myself. Eventually I worked on it a lot at Powerset where it was used successfully on every production server. We still use it in production on GitHub and it performs extremely well. God allows me to write custom conditions and operations that monit doesn't offer.
Sure, on some architectures it leaks pretty badly, and I do blame MRI for that. I've eliminated a good deal of leakiness, which you can read about at http://groups.google.com/group/god-rb/browse_thread/thread/01cca2b7c4a581c2. I'd love to figure out the rest of the leaks, but I'm less motivated to do so when it doesn't leak on Engine Yard's install of MRI.
I'm sorry god doesn't work for your situation, but you are responsible for evaluating software and managing your own time, not me. Enjoy monit!
The "awesome" claims are what stand out in my head and get my blood boiling when God can't even restart a process. Then I think about all of the other people who read the god website, believe it word-for-word (it even made it into Railscasts), and waste their time.
I couldn't find anything that documented all of the bad aspects of God so I felt compelled to write this post. I've already received a few "thanks" from people who were thinking about using God.
@cardmagic - "Really people, open source software is out there to improve your life. There are never any guarantees that it will work and in return you never have to pay a dime. I wish more people would understand that trade."
I believe Brad's point is not against OSS - in fact, isn't he just advocating a different OSS solution? (Albeit in his typical flagrant tone, which is not as reasoned and measured as yours and mine, fair sir).
Running two daemonized processes: orbited and activemq, I would unwatch orbited, check status and it was still watching activemq which was good. Then I would unwatch activemq, check the status, and orbited would be watched again! Wack.
I'm moving over to monit as well, I'm going to go read your latest post. =)
cardmagic (lucas carlson), when was the last time you fixed a memory leak and submitted a patch for MRI? yeah, thought so. you've been making a living off of ruby for how many years since you gave up php scripting now... 3? isn't it about time you spent some time on the core implementation of it?
the claim was that god is awesome. that's really typical hype. typical to ruby developers who re-invent a wheel and think they've done everyone a favor, when all they've done is built a leaky boat using a crappy implementation of an otherwise nifty language.
so yeah, call a turd a turd. yup, god's a bit turdlike. but so it monit. but at least monit's authors aren't telling you its awesome, and it isn't written in something that leaks.
use the right tool for the job. it isn't always going to be written in your language of choice.
Anyone who engages in this sort of hyperbole, calling their project God, making breathless claims that they are like a stable and proven software project, like Monit, except that they are awesome, had better deliver. If you say all that in order to get people to install a runaway Ruby script as daemon on their servers, they are going to come back and use language calibrated to deflate the hyperbole.
Open source software is business. It is not charity. This God of yours is not putting food in people's mouth. Open source is a licensing scheme. No one needs to show gratitude to a person, simply for attaching an OSI compliant license to their digital squiggles. No one here is an ungrateful benefactor.
Open source is a strategy to grow software, to encourage adoption, and collaboration. But it is just one strategy. Another strategy is to be honest about what you are marketing, still another is to provide an excellent basis for further development. Calling the software God, awesome, better than its competitors, is either dishonest or deluded. Either way, it doesn't give the impression that there is someone there willing to listen. It's all bad business.
Who here is attacking Ruby? I am grateful to Matz. I use his wildly successful language. It makes my life easier. It helps me create new things. You are not entitled to the same sort of fidelity that I show to Matz because I had the misfortune of cloning your repository on GitHub. That is not how open source works.
Brad is warning people that this project is going to waste their precious time, which is more important to me that stroking the egos of people who call their software God, claim it's awesome, and then get their panties in a bunch when someone says that, the claims are "bullshit" and the software is a "turd".
Maybe, if the original authors had not made such wildly exaggerated claims, then Brad would have said it is was unpolished, maybe I'd be installing something not called God, but given the claims to divinity, I am happy that Brad has been so blunt in his description of the software. Now I can install Monit and rest assured that it is the best tool for the job.
The purpose of this article is to warn people that someone is trying waste our valuable time by misrepresenting their software. Well done Brad, and thank you once again. Monit is awesome.
While sure the wording of this article was strong and at times childish, the claims of god since day one have been horridly hyperbolic and in my experience no way connected to the actual state of the software. Terrible documentation, bad feedback when something goes wrong. Like one person said, calling something that's basically in alpha, or in beta at best "Like [established project in it's 5th full version] but awesome" with no preconditions, or disclaimer is childish and misleading. Sure no one is paying the author but that doesn't mean they aren't costing me money. It's a trust thing, the developer makes a claim, maybe the community backs it up, and I make a call about investing my time and credibility with my peers into it.
In the case of god it was a bit like the Emperor's New Clothes. No one had said a bad thing about it or if so it was quiet or early on (google groups don't count to me as people are there because of problems - if we go by groups and irc channels every project sucks). After a couple years of existence and the documentation and product is barely better but the claims are still just as large I think a call out is due. It's about managing expectations.
And to those who do the "if you don't like it commit a patch" dance: First, people seldom have time to contribute patches to things just to get them to a base level of working, esp when there are established players out there. Usually it's about "Man this is great, if only it did X" (which is where I am at with monit...again). Second, OSS projects are cults of personality. Tom's response here alone is enough reason for me to not want to *use* the project again much less contribute. It sadly taints my otherwise very high opinion of the guy and other stuff he's worked on. Sometimes silence is the best responses to critiques. Esp if you find them particularly childish.