Ibatis.net is used in the project, the database is MySQL, when doing a batch update operation, need to execute 40 seconds, in execution to 30 seconds, will throw an exception: timeout expired, the timeout period elapsed Prior to completion of the operation or the server was not responding
Online A check, said set MySQL command timeout, so in Ibatis.net's Providers.config file set the commandtimeout= "600" parameter.
Results a test, or an error, the same anomaly ...
No way, can only trace the source of ibatis.net, finally found the Sqlmapsession.createcommand this method has a pit ... is to put _connection. ConnectionTimeout assigned to the command.commandtimeout ...
This is even annotated with MYSQL provider doesn ' t support it!
Fortunately, found the reason, can solve, in the MySQL connection string to add
Connect timeout=600 So ibatis.net will assign it to command.commandtimeout test no longer error, OK problem solved
Ibatis.net Execute SQL timeout commandtimeout a pit