Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

egg-mysql能配置连接断开后自动重连吗 #5286

Closed
fmshun opened this issue Jan 17, 2024 · 0 comments
Closed

egg-mysql能配置连接断开后自动重连吗 #5286

fmshun opened this issue Jan 17, 2024 · 0 comments

Comments

@fmshun
Copy link

fmshun commented Jan 17, 2024

现在线上有个问题就是一段时间没有访问数据库, 数据库会自动断开连接, 然后再次访问的话就会很慢, egg-mysql如何配置自动重连呢
image

可复现问题的仓库地址(Reproduction Repo)

// mysql数据库配置
config.mysql = {
client: {
...dbConfig.client,
password: __.decrypt(dbConfig.client.password, appKey),
},
app: true,
agent: false,
};

Node 版本号:

v16.1.0

Eggjs 版本号:

2.37.0

相关插件名称与版本号(PlugIn and Name):

"egg-mysql": "^3.0.0",

操作平台与版本号(Platform and Version):

线上linux系统

@fmshun fmshun closed this as completed Jan 19, 2024
@fmshun fmshun closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant