• System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: 超时时间已到。超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。


    2017/8/15 20:55:21	[AgentPayQuery_205506102_1BBBB]系统异常:System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: 超时时间已到。超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。
       在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       在 System.Data.SqlClient.SqlConnection.Open()
       在 System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
       在 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
       在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
       在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       在 System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       --- 内部异常堆栈跟踪的结尾 ---
       在 System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       在 System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
       在 System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       在 System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__1()
       在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       在 System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       在 System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
       在 System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       在 PaymentBLL.NewAgentPayBLL.GetByOrderNo(String orderNo, BusinessSystemEnums bizSystem)
       在 PaymentService.AgentPayQueryService.QueryPayResult(AgentPayQueryRequestModel reqModel)
    2017/8/15 20:55:21	[AgentPayQuery_205506102_1BBBB]支付中心响应结果:{"status":"FAIL","return_code":"1","return_message":"The underlying provider failed on Open.","return_time":"20170815205521","sign":null}
    
    2017/8/15 20:55:21	[AgentPay_205521542_DADCD]请求支付中心参数:{"amount":"4999900","is_business_acc":"0","order_no":"KB2017081500014631","rec_account_name":"钱勇","rec_account_no":"6212261611002875170","rec_bank_no":"ICBC","sign":"7cb0c867ac6315adadc631b94bb41832","third_pay_platform":"10"}
    2017/8/15 20:55:36	[AgentPay_205521542_DADCD]系统异常:System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: 超时时间已到。超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。
       在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       在 System.Data.SqlClient.SqlConnection.Open()
       在 System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
       在 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
       在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
       在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       在 System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       --- 内部异常堆栈跟踪的结尾 ---
       在 System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       在 System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
       在 System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       在 System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__1()
       在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       在 System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       在 System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
       在 System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       在 PaymentBLL.NewAgentPayBLL.GetByOrderNo(String orderNo, BusinessSystemEnums bizSystem)
       在 PaymentService.AgentPayService.AgentPay(AgentPayRequestModel reqModel)
       在 PaymentPlatform.QRCode.HandlerBase.ProcessRequest(HttpContext context)

    ref:http://www.cnblogs.com/feiyuhuo/p/5402582.html

    改变连接池的大小.在连接字符串的后面加上以下代码:

    Enlist=true;Pooling=true;Max Pool Size=300;Min Pool Size=0;Connection Lifetime=300;user id=sa;packet size=1000

    packet size参数取512到32767中的任一整数值

  • 相关阅读:
    mysql的CURRENT_TIMESTAMP【转】
    php开发中emoji表情的问题3种方法轻松处理【转】
    JavaScript 正则表达式【转】
    使用 内置函数strtok()函数实现 loadrunner 字符串替换
    python打开文件失败,报错'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence
    txt文本程序 打开python文件 另存为原来的文件名,不能覆盖原来的文件解决
    linux 文件解压
    tar.xz 解压
    设置xampp开机自动启动
    Can’t connect to local MySQL server through socket的解决方法
  • 原文地址:https://www.cnblogs.com/buguge/p/7368108.html
Copyright © 2020-2023  润新知