Re: Database Connection Lifetime
Rich Shepard <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 19 Oct 2006, Christian Boos wrote: > I dont know whether that's a "Best Practice", but from our usage in Trac, > it looks like keeping the connection objects alive is not a problem. Quite > the contrary, this seems to improve the behavior of concurrent requests by > reducing the likeliness of database locks, though I don't fully understand > the reason for that. Christian, Thank you for your input. Our application will have one user running the model, so that's not an issue. However, I agree that it's more reasonable to open and close the connection once than remembering to do so with each read or write. To increase our comfort level I'll flush new or changed data to disk as the model runs. Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863