Home All Groups Group Topic Archive Search About

Connection timeout when using SQL Server User Instance

Author
26 Nov 2007 5:51 PM
Axh
Is there a limitation on the number of (sequential) opened connection for SQL
Server User Instances?  The following method will run to about the 240th
iteration then will receive a timeout exception (SqlException. "Timeout
expired.  The timeout period elapsed prior to completion of the operation or
the server is not responding.").  If User Instance=false then the method will
execute to completion.  Note that connection pooling is off just for
demonstation; the real application does use connection pooling, but periodic
events require the connection pool to be cleared (and new connections
opened).  This is a desktop application and a user instance is required.

static void Main(string[] args)
{
    string connectionString = "Server=.\\SQLExpress; User Instance=true;
Trusted_Connection=Yes; Pooling=false; Connection Timeout=20";
    Console.WriteLine(connectionString);
    for (int i = 1; i < 1001; i++)
    {
    using(SqlConnection connection = new SqlConnection(connectionString))
    {
        connection.Open();
    }
    Console.WriteLine(i.ToString());
    }
}

Thanks in advance.

Author
27 Nov 2007 10:19 AM
WenYuan Wang [MSFT]
Hello axh,

I reproduced this issue on my SQL Express, but I haven't heard this
limitation before.
I will perform more research on this issue, and reply here as soon as
possible.
If you have any more concerns on it, please feel free to post here.

Thanks for your understanding!
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Author
29 Nov 2007 3:49 AM
WenYuan Wang [MSFT]
Hello Axh,
Thanks for your waiting.

This seems like a product issue. We haven't User Instance Connection
Limitation in SQL 2005 Express so far. I have logged this issue in our DB
for product team to investigate. This will benefit our product quality
improvement. Thanks.

But I'm afraid this issue may not be fixed very soon.
For urgent issues, we can contact Microsoft CSS directly.
If the problem is confirmed to be a product bug, the case charge will be
free.
You can check http://support.microsoft.com for regional support phone
numbers.

You can also post the issue to our Connect feedback portal. Our developer
will evaluate them seriously and communicate with you directly on the issue
there.
http://connect.microsoft.com/VisualStudio/
Improving the quality of our products and services is a never ending
process for Microsoft .

Thanks again for your posting. If you have any more concern, please feel
free to update here again. We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

AddThis Social Bookmark Button