“超时过期。从池获取连接之前的超时时间。这可能是因为所有池连接都在使用中,且已达到最大池大小。”

  • Post author:
  • Post category:其他


后台数据库连接时,多次调用造成程序超时报错,错误提醒如下:

“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.”

“超时过期。从池获取连接之前的超时时间。这可能是因为所有池连接都在使用中,且已达到最大池大小。”

解决方案:

配置连接字符串,配置线程池连接数max pool size=500,扩展连接数。

connectionString=pooling=true;connection lifetime=5;min pool size = 5;max pool size=500;server=***;database=***;User id=***; password=***;MultipleActiveResultSets=True;Enlist=false;Connect Timeout=1500;



版权声明:本文为qq_38199336原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。