On Jul 5, 2006, at 5:17 PM, [email protected] wrote:
Use Active Record callbacks to set their values to Time.now in
Thanks. I just read upon this in “Agile Web Dev. w/ Rails”.
Database connections are opened one per Rails instance (whether
FastCGI, Mongrel, or otherwise.)
By “Rails Instance”, you mean all requests must share the same
connection, or each request gets it’s own connection?
Rails requests are processed serially (one request at a time, single
file) so only one connection is required. By ‘Rails instance’ I mean
a dispatch.fcgi/Mongrel/webrick/etc process. Rails ‘scales’ by
adding more processes, so if you’ve set up lighttpd with 4 fastcgi,
you’ll have 4 database connections.