Skip to content

Clarification on connection lifetime and automatic closure in MySQL2 pool #3016

Open
@joaquinbentancor

Description

@joaquinbentancor

I would like to understand how connection lifetime is handled in the MySQL2 connection pool. Are connections "eternal" by default, or is there an automatic mechanism that eventually closes them?

Additionally, is it possible to configure a maxLifetime for the connections, similar to what is available in other languages/drivers, to ensure that they are closed after a certain period?

Could you also explain the conditions or timeouts under which a connection is automatically closed when it’s no longer in use?

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions