Recently, there was a multi-threaded program connecting to the local SQL Server 2008 and about 300 connections. After a while, the "timeout expired" error will appear in the Self-written log, or the error "does not exist or access is denied" appears. The strange thing is that after the program is enabled, it must be connected. This error will only happen in a short time.
SQL Server logs and Windows event books do not see any valuable information.
First, there will not be multiple threads using the same tadoconnection; the table index is also created, and a single query will not exceed 1 second.
When an error occurs about 30 seconds after the program is enabled, try to adjust the timeout value of tadoconnection/tadocommand/TADODataSet to 120 seconds, an error occurs about 30 seconds after the program is enabled.
The number of connections allowed by sqlserver is 0, and there is no limit. You can adjust the connection/command timeout time of sqlserver, which is still the same. Depressed.
Is there a problem with the program itself? To simplify the problem, write a small test program, open 300 threads, and create tadoconnection/TADODataSet in the thread to query the same table in the same database, even if it is opened to 600 threads, no error will occur. It seems that SQL server is not strong enough, and then depressed.
Google has countless materials. It is said that the increasing Mode of database files or log files is incorrect, resulting in timeout during growth. There is no limit on log growth, but it is still not feasible after trial.
The problem is not found in the network configuration of the server on the SQL Server Client.
..........
..........
Finally, you can accidentally change "Data Source =." In the connection string to the computer name. It is strange that the local IP address 192.168.3.33 cannot be connected. Is it a DNS problem?