From: "Morris, Chris" Date: 2002-07-13T08:43:02+09:00 Subject: RE: cache dbi for web app > Switching to mod_ruby would help a lot, both removing the interpreter > start-up time and giving you a persistent database connection. > > For the connection, something as simple as > > db ||= DBI.connect(...) > > at the start of the script will work fine until you want to get > sophisticated and do things like reconnect after database shutdowns > and the like. How would this work for multiple, simultaneous web sessions? Is the same database connection being used by all web sessions? If so, then the rest of the script would have to protect against any potential problems with that. Chris