question

itaboo avatar image
itaboo asked

Open and Close calls

I have had a issue with my site locking up and then it would release itself after 10secs to 30secs, some times I got the message cant connect to SQL. My programmer did not know what the issue was so I paid 250.00 and called Microsoft, and they installed some software on the web servers to capture it and they found that we had way to many open and closes at a time. Even thought we only have about 20-40 people on line at any time, they said every function is a open and close as the server and there is thousands going on at a time. They had me go into the web config file and in the connection string I was told to enable connection pulling, I guess this is something that should be on, in 2008. This will keep the connection open for 20-30 secs. creating less connections through the port. My question is how do we get the max out of each open and close, that is what he said, can we request more then one item in a open and close? Thanks,
sql-server-2008
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Why are you hitting the database thousands of times? What are the calls doing? Are you using LINQ2SQL calls?
0 Likes 0 ·

1 Answer

· Write an Answer
Shawn_Melton avatar image
Shawn_Melton answered
Just something to check on SQL Server side is if AUTO_CLOSE is enabled on the database. I have seen this cause that error a few times on some web apps. You will also know this is enabled by looking at the SQL logs and seeing constent constent messages about the database starting. I believe what he had you enable in the config file was "[enable connection pooling][1]"? This is a new feature in Window Server 2008, with ODBC driver manager version 3.0+. Instead of the web app making a new connection every time it makes a call, it allows it to reuse a connection, after testing it first. You might want to read over [this][2] though on a downside to it that can cause performance issues. [1]: http://support.microsoft.com/kb/169470 [2]: http://support.microsoft.com/kb/168250/EN-US
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.