<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.6944.0">
<TITLE>Threading &amp; database connections.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>

<P><FONT SIZE=2 FACE="Arial">Hello all.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Bear with me, there is a Mongrel question in here ;)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have been having some fun with database connections and ruby. Long story ( Found here: <A HREF="http://www.ruby-forum.com/topic/56047">http://www.ruby-forum.com/topic/56047</A> ) 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!</FONT></P>

<P><FONT SIZE=2 FACE="Arial">so I thought &quot;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!&quot;.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Having messed around (Read: failed)&nbsp; 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.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">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 &quot;Running&quot; 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.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">The threadedness of mongrel is the only difference I can see between it and the (I assume) threadless and working Webrick</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Thanks for reading through this rambling tale of adversity, sorrow and great dogs and I am hoping you can give me a happy ending.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Jeff</FONT>
</P>

</BODY>
</HTML>