Click here to Skip to main content
15,901,373 members
Home / Discussions / Database
   

Database

 
GeneralRe: Installing MySQL on Windows Pin
Jon Sagara5-May-03 8:11
Jon Sagara5-May-03 8:11 
GeneralRe: Installing MySQL on Windows Pin
Jean-Marc Molina29-May-03 13:35
Jean-Marc Molina29-May-03 13:35 
GeneralPlease help me troubleshoot this SQL Statement Pin
MBoudet2-May-03 6:31
sussMBoudet2-May-03 6:31 
GeneralRe: Please help me troubleshoot this SQL Statement Pin
Chris Meech2-May-03 6:45
Chris Meech2-May-03 6:45 
GeneralRe: Please help me troubleshoot this SQL Statement Pin
Rein Hillmann2-May-03 17:19
Rein Hillmann2-May-03 17:19 
GeneralDocumentation tool for SQL Server DB's Pin
Jonas Follesø2-May-03 5:45
Jonas Follesø2-May-03 5:45 
AnswerRe: Documentation tool for SQL Server DB's Pin
Amit Chaudhary3-May-09 21:37
Amit Chaudhary3-May-09 21:37 
QuestionConnection Pooling - Bug in .NET ? Pin
John Honan2-May-03 2:12
John Honan2-May-03 2:12 
I have run a few tests and am now convinced that there must be a problem with connection pooling, or connections not being freed up correctly by .NET

My test is as follows. I have an XML Web Service running on an IIS site running on .NET 1.0 with all service packs applied with the following site configuration:

Anonymous Access: Yes
User name: domain\xxxxx <-- this username has access to the SQL Server
Allow IIS to control password: Yes
Basic Authentication: No
Integrated Windows authentication: Yes

The test method I am calling is written in VB.NET (code follows), when I pass in '50', the method creates 50 connections, pauses for 20 seconds to hold them open, and then they are closed and disposed - this works fine. The problem happens when I pass in '150'. The following exception is thrown;

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. at System.Data.SqlClient.SqlConnection.Open() at MyService.DataService.AuthenticateUser(String DomainUsername) in \\servername\CREQSERVICE\DataService.asmx.vb:line 172 --- End of inner exception stack trace ---

But even worse, the connections never seem to be released and the server becomes unstable; further connections to IIS time out. If I stop/start the web service it doesn't clear the connection pool. I have tested this on three different test servers, and get the same problem.

Any help with this would be appreciated, I'm trying to get some code into production, and this problem has delayed me for a week already. Does anyone know if there is a known bug with connection pools?

Code used for testing:

<WebMethod()> Public Function CreateTestConnections(ByVal NumberOfConnections As Integer) As String
    'This is for testing only!, remove from production code
    Dim conSQL As Array = Array.CreateInstance(GetType(SqlConnection), NumberOfConnections)
    Dim t As Long
    For t = 0 To NumberOfConnections - 1
        Try
            conSQL(t) = New SqlConnection(ConfigurationSettings.AppSettings("connectionstring"))
            conSQL(t).Open()
        Catch e As Exception
        End Try
    Next t
    'pause for 20 seconds
    Dim Start, Finish, TotalTime As Double
    Start = Timer
    Finish = Start + 20.0
    Do While Timer < Finish
        ' Do other processing while waiting for 20 seconds to elapse.
    Loop
    TotalTime = Timer - Start   ' Calculate total time.
    For t = 0 To NumberOfConnections - 1
        conSQL(t).Close()
        conSQL(t).Dispose()
    Next t
    Return "Finished"
End Function




www.silveronion.com[^]
Questionlength of time a Connection to Database exists? Pin
sharathkv1231-May-03 18:23
sharathkv1231-May-03 18:23 
AnswerRe: length of time a Connection to Database exists? Pin
1-May-03 19:36
suss1-May-03 19:36 
AnswerRe: length of time a Connection to Database exists? Pin
J. Dunlap1-May-03 20:16
J. Dunlap1-May-03 20:16 
Question"Copy Project" and SQL ??? Pin
gman441-May-03 13:04
gman441-May-03 13:04 
AnswerRe: "Copy Project" and SQL ??? Pin
Member 961-May-03 19:21
Member 961-May-03 19:21 
GeneralRe: "Copy Project" and SQL ??? Pin
J. Dunlap1-May-03 19:26
J. Dunlap1-May-03 19:26 
GeneralRe: "Copy Project" and SQL ??? Pin
gman442-May-03 12:24
gman442-May-03 12:24 
GeneralRe: "Copy Project" and SQL ??? Pin
Member 962-May-03 14:03
Member 962-May-03 14:03 
GeneralRe: "Copy Project" and SQL ??? Pin
J. Dunlap2-May-03 17:09
J. Dunlap2-May-03 17:09 
GeneralQuery Statement Pin
blindzebra1-May-03 8:30
blindzebra1-May-03 8:30 
GeneralRe: Query Statement Pin
Member 961-May-03 19:12
Member 961-May-03 19:12 
GeneralRe: Query Statement Pin
Richard Deeming2-May-03 2:50
mveRichard Deeming2-May-03 2:50 
GeneralConnection Pooling Pin
RedZenBird1-May-03 7:42
RedZenBird1-May-03 7:42 
GeneralSql transaction log format Pin
jspano1-May-03 7:07
jspano1-May-03 7:07 
GeneralChecking Query Progress Pin
perlmunger30-Apr-03 4:31
perlmunger30-Apr-03 4:31 
GeneralInstall packages for serversoftware. Pin
Jonas Follesø30-Apr-03 1:35
Jonas Follesø30-Apr-03 1:35 
GeneralRe: Install packages for serversoftware. Pin
Rein Hillmann1-May-03 5:58
Rein Hillmann1-May-03 5:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.