[Mongrel] Threading & database connections.

Jeff Jones jjones at raindrop.co.uk
Tue Feb 28 09:19:13 EST 2006

Hello all.

Bear with me, there is a Mongrel question in here ;)

I have been having some fun with database connections and ruby. Long story ( Found here: http://www.ruby-forum.com/topic/56047 ) short: I was making far too many in my application. I eventually fixed this (I thought) and when running webrick there were only ever two connections (One to each database) no matter how many users, this was perfect!

so I thought "Great! I'll now put it on that mongrel server I have read so much about since it kicks the stuffing out of webrick and is perfectly suited to a smallish intranet site!".

Having messed around (Read: failed)  with Apache getting Mongrel running was so simple (Thanks!). Then after a bit of testing I got shouted at by the Service department for a steadily increasing number of connections to the Oracle server.

Having read up on Mongrel I see there is an option to limit the number of threads it can use. My question is: Does each thread correspond to a "Running" instance of the application? If so then limiting that would theoretically limit the number of DB connections...right? When I look at the task manager (Yet, I am running windows...no I didn't have a choice in the matter ;) I see only once instance of ruby.exe running.

The threadedness of mongrel is the only difference I can see between it and the (I assume) threadless and working Webrick

Thanks for reading through this rambling tale of adversity, sorrow and great dogs and I am hoping you can give me a happy ending.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060228/bc1736f6/attachment.htm

More information about the Mongrel-users mailing list