Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Use Monit with Rails, not God (bradgessler.com)
22 points by bradgessler on April 24, 2009 | hide | past | favorite | 34 comments


"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 Presten-Warners 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."

This is absolutely hilarious! A process monitor leaks memory and crashes the server. Words fail me!

EDIT: Rub my eyes and read again. Ruby leaks memory? The language (interpreter ? VM? ) leaks memory? That can't be right? He must have meant the application (God) leaks memory (perhaps by holding onto objects and not letting the GC collect them)


The language (interpreter ? VM? ) leaks memory?

AFAIK the interpreter has no intrinsic leaks, but many ruby applications keep objects referenced beyond their intended life, preventing GC.

Edit: You extended your edit after I started responding :->

perhaps by holding onto objects and not letting the GC collect them

Yup, that's my understanding.


MRI has had a variety of memory leaks. I did an extensive search for the memory leaks on god, which you can read about here: http://groups.google.com/group/god-rb/browse_thread/thread/0.... I've verified that it's not an object referencing issue (which you can also read about in that link). Something in the threading code of MRI appears to be at fault, but I haven't had time to track that down yet.


Tom , I just saw your comment on the post. I stand corrected. It seems the Ruby interpreter does leak memory!


Interesting, thanks for the pointer.


"AFAIK the interpreter has no intrinsic leaks, "

ok if what you say is true then Brad's blog post is just wrong isn't it?. Either he is right or you are.

Holding onto objects sounds like something user code does so "ruby leaks" is (or should be) not correct usage I think.

I use python I don't use Ruby, but "Python leaks", as a claim, is different from "my program written in python leaks memory".

the blog post seems to imply it is Ruby's fault. At least it reads that way ("Ruby leaks") hence my confusion. Thanks for the clarification

EDIT: I stand corrected. It seems like Tom is right and the ruby interpreter leaks memory! Incredible!


Just for the record, the correct spelling of my name is "Tom Preston-Werner." If you're going to attack me, please take a moment to spell my name right. Thanks!


Tom, thanks for all your contributions to the open source community. I hope that one guy writing an immature article doesn't make you feel too negative.

I'm surprised that an article written with that tone made it to the top of HN.


Which part, exactly, is immature? Did I miss the part where he called Tom a "stupid fat head" or something? From what I read, the product does not work as advertised and in fact eventually causes itself to crash, yet the page begins with "monit except awesome". Hell, I loathe Ruby and I was even convinced it was a better alternative to monit!

I think anybody who releases open source software is to be commended; without it, most of us wouldn't have businesses. I have great respect for all contributors. That being said, just because you put something out there doesn't give you immunity against negative reviews. And it doesn't justify others, such as yourself, in berating those who give such reviews.

Most free software is forthcoming about its warts and issues. We're generally told when something should not be used for production. Instead, the pitch for god is that, well, it's God. I believe his tone was dead on for someone who felt betrayed by a piece of software that promised the world yet could not even maintain its own running state. After all that fighting, I'd be pissed too.


Well mostly the part where he rants about how much time he wasted, etc.

That's not a negative review, it's a slap in the face.

Also, it is somewhat disgusting to me that a wanna-be blogger would decide (to publicize his blog?) to rip on a guy who has been a great open source contributor AND has managed to bootstrap several successful startups (notably gravatar and github).

Tom is clearly busy and productive and is (in my opinion) a great role model for how to combine excellence in open source and entrepreneurship, and is the LAST person that anyone should be going out of their way to rip on.


Now you're attacking Brad for attacking Tom when he never personally attacked him. Brad isn't a "wanna-be blogger", at least as far as I know the man. He sent me a link to the post and said "I hope he changes some of the wording" -- he just wanted the god docs to accurately reflect the production status. That's all. Oh, and make millions of dollars off of all blog subscribers I'm sure he got as a result. That was sarcasm, by the way.

Brad never ripped on anything else Tom has done. He never even suggested that the state of the god docs reflected poorly on him as a developer or a person. He was merely supplying information and venting frustration over the previous six months he spent attempting to get Tom's product to work properly. Hell, he wasn't even mad that it was (for him) an incomplete, non-functioning product, he was just upset that it wasn't presented as such!

I didn't know who Tom Preston-Werner was before this post, but apparently he has indeed bootstrapped several successful startups and is a great open source contributor. Good for him, and I thank him for his contributions. One of the reasons I want to become financially secure is so that I can devote most of my time to OSS, so everyone who contributes largely to said software gets my utmost respect and admiration. I don't see how any of that has any bearing on the status of god's documentation, however.


The following is not a personal attack?

"call a turd a turd"

The guy sounds like an 8 year old. It's just incredibly unbecoming. Anyway, if you like his blog, good for you.


The "turd" here was god, not the author thereof. You seem to be confusing the two. Or anthropomorphizing god. Or something.

I like Brad as a person, but I don't think I've read his blog before. And he usually acts on par with an 11 year old, so take that into account.


It's tough to separate the creator from the product of the creative act. Why would Tom have created God if not because he was inspired to write something cool and useful.

To then sit around calling it names is an insult not just to Tom but to anyone who is engaged in productive, creative work. Also, this kind of thing will only discourage others from releasing their code to the community...


My sentiments exactly. Tom has contributed some wonderful things to OSS including Chronic and Grit. I've used Chronic on many projects and have been very happy with it because it works as advertised. Thats just not the case for God.


Am I using a different version of God than you guys or something? It's been nothing but awesome for me and the framework I built around it, which now has been running in production happily for months monitoring over 20 different ruby processes (http://www.github.com/jcapote/theman).

Also it deeply saddens me that an article as emotional as this makes it to the front page.


I think older versions of God work Ok.

My hopes for this article is that I can shorten the evaluation for others who consider God. Consider this the "Monit (like god, only it works)" of "God (like monit, only awesome)" post.


You must not have read the forums. Some newer features of god require a linux kernel module that is not included in Ubuntu by default. You should probably have read the forums sometime during hour 1 of your experience.


Thanks, grandalf! It means a lot to me for you to say that.


Haven't all the cool kids moved on to Phusion Passenger? Is there still a compelling reason to play around with mongrel/thin etc clusters?


Yeah, that's the next trend. There are still quite a few people though stuck with mongrels/things and are still using God.

For our company we're stuck with thins because of a very specific way we're launching our application. Phusion doesn't have everything we need (yet).


EY doesn't support Passenger for their big clients yet. So all the big Rails sites through EY use nginx + mongrels.

However, EY does use monit.


EY is now offering Phusion Passenger for Nginx to their clients.


So it seems they have, interesting.


God doesn't actually work.

We used god on FamSpam, currently use it on GitHub, and I've heard at least two massive Facebook apps (Friends for Sale and Rock Legends) use it to manage a large number of processes across a large number of servers.

For intelligently killing runaway processes (different attempts with different kill methods), monit is rather lacking. At CNET we ran into this again and again so I was very excited when Tom started god.

On one of our GitHub app slices, god has been running for 8 days and is using 8 megs of RAM. I can't speak for anyone else's setup, but I haven't seen the famed memory leak.

I would recommend god to anyone running a high trafficked Ruby-based site.


I think God is useful for "prototyping" an app environment. It's got a nice DSL and b/c it's ruby, it's turing complete. It's great for stage servers where flexibility and productivity are more important than a couple nines of uptime.

Monit's config is fairly straight forward, but the monit daemon can be quirky and unpredictable at times, and I usually have to hack out a bash script b/c monit is pretty limited on what it can actually do.

So I start with God, then translate that into Monit + scripts when I get to production.


Would it be that hard to write a side-by-side comparison of God vs. Monit? You know, a bookmark/share-worthy post with some meat in it.

Was this just an attempt to stir the pot or were you just shooting from the hip?

FTR, I use God and its works fine for me.


This analysis makes me a little sad. I want to like mojombo's work (I like Github a lot) but I've just had too many issues with his OSS.


May I ask which other projects you've had problems with?


God - Same issues stated in this article. I've had to move two different clients off of it to Monit.

Jekyll - I managed to access Github's database.yml in cleartext, I'm sure you remember that.

Fuzed - Never ran

Now, albeit, none of these had a 1.0 release and were practically abandoned before they reached it. I'm okay with that, because I really, really like Github.


uh it says right in the fuzed README that it may not run on your system.

Would you rather that tom had just kept all the code to himself until he got around to polishing it to the point where it ran on most systems?

I think releasing it to the community where others can work with it is the best approach, particularly if the main developer doesn't have the time to make it a top priority.


I didn't mean any offense, I meant only to share my experiences relevant to the article with HN.


Chronic is bad ass; as-is github.

I've only been disappointed with God mainly because its marketed as being "like monit, only awesome" when its really not.


there is no need for you to make statements like that, sir. At least substantiate them and explain why you chose not to submit a patch, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: