Timeout expired. Silverlight, Entity Framework, WCF

Discussion in 'Site Programming, Development and Design' started by JimS, Feb 25, 2011.

  1. About an hour ago, I started getting this message from one of my applications. Other applications on the same web server and the same SQL server are not affected, including another Silverlight, EF, WCF application.
    -------------
    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.

    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.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [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.]
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +5024537
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
    System.Data.SqlClient.SqlConnection.Open() +125
    System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +47

    [EntityException: The underlying provider failed on Open.]
    System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +167
    System.Data.EntityClient.EntityConnection.Open() +94
    System.Data.Objects.ObjectContext.EnsureConnection() +83
    System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +47
    System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +45
    System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +182
    System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1(IEnumerable`1 sequence) +40
    System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +60
    System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +147
    System.Linq.Queryable.FirstOrDefault(IQueryable`1 source) +265
    iVG.Web.ssCookie.GetPerson(String eMail) in E:\Documents\Visual Studio 2010\Projects\iVG\iVG.Web\ssCookie.cs:67
    iVG.Web.SignIn.ButtonSignIn_Click(Object sender, EventArgs e) in E:\Documents\Visual Studio 2010\Projects\iVG\iVG.Web\SignIn.aspx.cs:21
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
     
  2. Forgot to mention: I recycled the app pool

    Also, It fails with all three browsers that I tried.
     
  3. Ray

    Ray

    The error means you have used up all your connections to your SQL database. First recycle your application pool to clear it up. Then make sure your application is completely closing all your database connection. Then try increasing the "Max Pool Size" value in your connection string.
     
  4. Thanks for the quick reply. It turns out I had uploaded the debug version instead of the release version.
     

Share This Page