Tom Ward wrote:
> I tried looking in my history, and I _think_ this might be the post I > was thinking about: > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/211423 > > But this guy is also using ADO anyway. And I have no way near enough > knowledge about Ruby or this guy's particular problem to know why his > code fails.
He's opening a second statement against a connection while he already has one open. That's not supported by dbi drivers, and not used within rails.
Okay, that floors the one post I've found with serious problems with MSSQL integration. Perfect
> Okay, I gotta know now. Why exactly would one keep IIS instead of just > running the Webrick server? Does it scale badly, or...? Do I get any > kind of extra features by integrating with IIS that I'd otherwise miss > out on?
Webrick is really just a toy server. It's great for development, but no way near stable/secure enough for production.
In place of Webrick many people use Mongrel, which is extremely easy to set up and use and excels at serving rails applications (though not great at static content). It also comes with excellent documentation, and a very helpful userbase. However, Ruby on Rails is not thread safe, so when running rails, only a single concurrent request can be handled. This is a rails issue - Mongrel itself can handle concurrent requests.
To get around this, most deployments run many mongrel processes on each server, each on a different port. To distribute requests between each mongrel instance, some form of load-balancer or proxy is used (there seem to be loads to choose from, though I don't know what exactly what your options are on windows). One common solution is to use Apache; it may be possible to use IIS but doesn't seem exactly recommended
Okay, wait a minute... This seems like quite an ugly hack? I assume you'd keep the many instances running to avoid the delay from having to start an instance for each request? Is there no plan to fix this soon? If not threaded, then at least Rails should be able to fork itself? Or am I completely off here...? It seems that having severel Rails running concurrently would be hard to administer, use excessive memory, and what if one instance crashes - would some users then just hang in a queue waiting for it to come back up while others get in one of the good queues? Okay, I admit, I'm more confused than anything about this. Does a site like gbposters.com really run a lot of Rails instances to handle their 5000+ hits per day? Maybe I should just ask them