always call Connection.Close()

解决方案 »

  1.   

    anytime you call Connection.Open(), at the end of your database operation, call Connection.Close() or set a large pool size, for example, for System.Data.SqlClient, you could add 
    "Max Pool Size=200" 
    in your connection string
      

  2.   

    that is just an example, the default value is 100, if you have a lot of concurrent users, you should increase its valuethe point is that you should always close the connection when you are done with it