连接数据库过程中发生错误,检查服务器是否正常连接字符串是否正确 返回

SqlSugar 沟通中
2 612
该叫什么 发布于2025/1/3
悬赏:0 飞吻

连接数据库过程中发生错误,检查服务器是否正常连接字符串是否正确,错误信息: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.DbType="SqlServer";ConfigId="".

English Message : Connection open error . 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.DbType="SqlServer";ConfigId=""


热忱回答2

  • 2种情况

    1、线程安全问题引起的释放失败 ,看文档:偶发

    2、并发过高导致连接池不够,如果并发不高肯定是 1 ,如果并发高那就改成异步并且字符串设置max pool size设置512 ,也可以使用队列缓存等减少并发请求

    0 回复
  • 。 VIP0
    2025/1/3

    @fate sta:先试着改max pool size试试看

    0 回复