Notes on Software

Connection pooling is good

Posted by K. M. on August 9, 2008

I was writing a project which involved accessing user instances of a SQL Server database from two separate processes in turn. This failed with “Login failed” error messages. Connection pooling meant that the process which attached the database first did not close its connection even after its use of the database was over. A simple solution seemed to be to disable connection pooling on both processes. This worked in the sense that there were no exceptions. But performance took a huge hit. Finally I changed the design so that all the work was done in a single process. I could afford to do it since there was not much code involved. This is something to keep in mind when using user instances in SQL Server. Disabling connection pooling is an unacceptable solution.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: