[Mono-list] Re: Maintaining just one DB (Npgsql) connection for web services
On 2005-05-20, Joe Audette scribbled these curious markings: I think trying to use just 1 connection is not a good idea. You want to use connection pooling to re-use connections but not just 1 connection or your app won't scale to many users. Hmm, thanks for the advice. Connection pooling does sound like what I want. Support for connection pooling is built in to the .NET data providers. Aha, that's the rub! This automagic Just Works is why I love the .NET platform. Thanks again, and thanks especially for the very speedy reply! Best Regards, Christopher Nehren -- I abhor a system designed for the user, if that word is a coded pejorative meaning stupid and unsophisticated. -- Ken Thompson If you ask the wrong questions, you get answers like 42 and God. Unix is user friendly. However, it isn't idiot friendly. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Re: Maintaining just one DB (Npgsql) connection for web services
Glad to be of help. Support for connection pooling is built in to the .NET data providers. Aha, that's the rub! This automagic Just Works is why I love the .NET platform. The main thing to remember in .NET connection pooling is that it will use a different pool for each variation of the connection string. If your app just uses 1 connection string I think you are all set. If you are building a different connection string say by credentials passed in the request, you would get a different connection pool for each different connection string. I'm fairly certain the Npgsql data provider has connection pooling enabled by default and can be turned off by a setting in the connection string but you may want to double check the documentation for Npgslq cause I'm not 100% sure. I think I have pooling=true in my connection string but I don't have the code here with me to check. It is possible that is needed to enable the pooling. Hope it helps, Joe joe_audette [at] yahoo dotcom http://www.joeaudette.com http://www.mojoportal.com ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list