MySql.Data.MySqlClient.MySqlException: Timeout expired

会有一股神秘感。 提交于 2019-11-29 13:12:51

I encountered the same problem with yours, and I found this MySQLConnection--Specifying default command timeout.

Just add "default command timeout=xxx" into your connectString, this key's value is in seconds.
I tried and it worked for me.

You could set command timeout to 0, its not a good idea though. Some requests could go on indefinitely.

There is an underlying problem that is causing the queries to time out in the first place. Are you inserting, updating, or in any way working with large binary values that would lock the table? That is the most common reason I see for an error like this on such a small amount of data.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!