Time Expired, pool is full

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2008
Posts: 9
Reputation: themailsian is an unknown quantity at this point 
Solved Threads: 0
themailsian themailsian is offline Offline
Newbie Poster

Time Expired, pool is full

 
0
  #1
May 27th, 2008
Hello dears,
I m facing below mentioned Error in my application.
where as all my database connections are closed.

my code is as under:
i have made a function that is being used with each type of query in my application.

  1. Public Function exeQuery(ByVal query As String) As String
  2. Dim msg As String
  3. Try
  4. connect()
  5. fComm = New SqlCommand(query, fConn)
  6. fComm.ExecuteNonQuery()
  7. fConn.Close()
  8. fConn.Dispose()
  9. Return "1"
  10. Catch ex As Exception
  11. fConn.Close()
  12. msg = ex.Message.ToString()
  13. Return msg
  14. Finally
  15. fConn.Close()
  16. End Try
  17. End Function
'Execute Insert, Update and Delete Queries
but when 3 or 4 person use this at the same time it gives the error.
Please suggest me most convenient way at earliest.

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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

  1. Exception Details: 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.

Best Regards,

Naveed
Last edited by peter_budo; May 31st, 2008 at 8:11 am. Reason: Keep It Organized - please use [code] tags
Needo
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 43
Reputation: sebastian3 is an unknown quantity at this point 
Solved Threads: 1
sebastian3 sebastian3 is offline Offline
Light Poster

Re: Time Expired, pool is full

 
0
  #2
May 28th, 2008
Cant comment without viewing the Connect() function.

Check whether the function is returning where u have given the Return 1 statement without calling the finally block.
You can check whether any Datareaders remains unclosed.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 291
Reputation: ericstenson is an unknown quantity at this point 
Solved Threads: 29
Team Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: Time Expired, pool is full

 
0
  #3
May 29th, 2008
In your connection string to the database add Pooling=False;

I caution you, however, there is something "seriously concerning" if you are exceeding 100 connections to your db at the same time. make sure you are closing out your connections! do you have background threads using the db????
--
"Dummy."
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC