Skip to content
DBAPI
Search
K
Main Navigation
🏠Home
📚Documentation
📘Guide
🏢Enterprise Guide
📥Download
🚀Installation
🔑Activation
🧩Plugins
📚Cases & Blogs
🎥Video Tutorials
📋Change Log
🔄Upgrade
🔌OpenAPI
🧮Dynamic SQL Syntax
⚙️Groovy Syntax
❓FAQ
💼Business Questions
🌱Ecosystem
🛒Plugin Market
✉️Contact
🏢Enterprise
💰Purchase
🏢Enterprise DBAPI License
👤Personal DBAPI License
English
简体中文
English
简体中文
Appearance
Return to top
On this page
数据库连接断开后,DBAPI的数据源如何自动重连
现象
在使用DBAPI的过程中,如果网络抖动导致数据库连接不上,发现DBAPI的数据源不能重连,必须重启DBAPI才能连上数据库
解决办法
方案一:配置数据源参数
在数据源的连接池参数配置
druid.breakAfterAcquireFailure=false
注意在企业版的
4.1.1
及以上版本才可以配置连接池参数
方案二:手动重置数据库连接池
企业版
4.3.0
开始,支持手动重置数据库连接池