Skip to content

egg-mysql超过空闲时间之后断开连接的问题 #4414

Open
@MD-luffy

Description

@MD-luffy

一段时间不操作数据库之后,再进行操作,比如执行await app.mysql.query(..)时就要很久才能返回(很多时候对于前端来说就超时直接返回接口调用失败了),目测是长时间没操作数据库连接断开了,在egg-mysql文档里面没看到有检测连接状态和重连的方法,不知道大家是怎么处理这种情况的呢 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions