我在互联网上搜索了很多,但没有找到任何关于 mysql 超时的简要说明和示例。我想知道下面列出的 mysql 差异超时的含义,还想知道我们为什么以及何时使用它们。
+----------------------------+----------+
| Variable_name | Value |
+----------------------------+----------+
| connect_timeout | 10 |
| delayed_insert_timeout | 300 |
| innodb_lock_wait_timeout | 50 |
| interactive_timeout | 28800 |
| net_read_timeout | 3 |
| net_write_timeout | 60 |
| slave_net_timeout | 3600 |
| wait_timeout | 28800 |
+----------------------------+----------+
另外,在 ruby on rails 应用程序中,我可以在我的 database.yml 文件中设置 read_timeout
。如果查询无法在指定的 read_timeout
值内读取数据,mysql 将关闭连接。所以我也想知道 net_read_timeout
和 read_timeout
谢谢,
最佳答案
来自 The Ultimate Guide to Ruby Timeouts
connect (or open) - time to open the connection
read (or receive) - time to receive data after connected
write (or send) - time to send data after connected
checkout - time to checkout a connection from the pool
statement - time to execute a database statement
关于mysql - 不同的mysql超时是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34250104/