Skip to content

database client connections leak #713

Open
@LinuxSuRen

Description

@LinuxSuRen

Description:

What issue is being seen? Describe what should be happening instead of
the bug, for example: api-testing should not crash, the expected value isn't
returned, etc.

The client connections always increase when I try to query data from MySQL. I guess this bug is due to I always switch between different databases. And the database extension will always create the new connection.

Repro steps:

Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.

Note: If there are privacy concerns, sanitize the data prior to
sharing.

Below is the possible code lines related to this issue:

https://github.com/LinuxSuRen/atest-ext-store-orm/blob/539f3ce19d7f847bddceba1c6f2011546d0355bc/pkg/server.go#L122

Environment:

Include the environment like api-testing version, os version and so on.

Logs:

Include the access logs and the api-testing logs.

You can monitor the MySQL connections via MySQL Workbench or other tools.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggoPull requests that update Go codegood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions