连接池链接The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
时间: 2023-09-21 07:03:51 浏览: 231
连接池中出现"The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."错误通常是由于数据库回收了连接,而连接池没有及时感知到所导致的。解决这个问题的方法是通过修改数据库的配置来延长连接的超时时间。可以在配置文件中添加如下参数:[mysqld] wait_timeout=86400。这样配置后,连接池中的连接在超过指定时间后才会被数据库回收,从而避免了连接超时的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received](https://blog.csdn.net/MonkeyBrothers/article/details/79398847)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [The last packet sent successfully to the server was 0 milliseconds ago 异常解决方案](https://blog.csdn.net/qq_42384113/article/details/126518239)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文