我在连接字符串中添加了 Max Pool Size=50。这似乎没有帮助。
我收到一个错误 dreamhost2.vshost.exe 错误:0:用户 gensurv_general 已经有超过 'max_user_connections' 的活动连接
基本上我只想等到连接数量可控。
我的程序是这样的
For i = 0 To 2000000 Step 10
Dim j = i
Threading.ThreadPool.QueueUserWorkItem(
Sub()
Using connect1 As New MySqlConnection(ConnectLocalhost.serverString)
connect1.Open()
Dim cmd = New MySqlCommand("set net_write_timeout=99999; set net_read_timeout=99999", connect1) ' // Setting tiimeout on mysqlServer
cmd.ExecuteNonQuery()
Dim BusinessReader = selectSomeQuery("Select * from tablebusiness limit " + j.ToString + "," + 10.ToString + "", connect1)