Skip to content

Memory Leak associated to Cycling Connections #726

Closed
@aikar

Description

@aikar

RE: #723 issue came to light because of this ability to cycle connections automatically with #724 , but this could in theory be triggered without my PR if the end user doesn't use a persistent pool, the connections timeout often, or they manually close and create new pools (maybe changing databases being worked on at a time)

I can verify that #723's issue has been fixed, but it appears there is yet another memory leak related to cycling connections.

Do you have any thoughts on where the issue might lie?

We're going to need to hold off on pulling #724 until this memory leak can be resolved.

It's leaking in native memory, as a 700M process only gave me a 20M heap dump, which is the same size heap as a 200M process.

Doing a heap comparison over 24 hours showed no signs of leaking on the heap....

So what other areas could be touching native memory? Doesn't look like the PreparedStatements have anything to do with it.

To reproduce, pull in 723 to local environment, configure it to have min 0 max 5 or so, timeout 30, write some code that every 60s it does 4 queries. this should cause connections to constantly cycle.

Then let the process run for a few days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions