Skip to content

Proposal of another poolSettings parameter #66

@pisabev

Description

@pisabev

Currently connection leak detection can destroy a connection in busy state if the query exceeds the "leakDetectionThreshold" timeout. I have tried this code in place of "idleTimeout" property just to check if it works. It will destroy connection only if the connection state is in "Idle" state and not released to the pool. Seems ideal for leaking connections. Or I'm missing something ?

_checkIdleTimeout(PooledConnectionImpl pconn) {
if (_connections.length > settings.minConnections) {
if (pconn._state != available //Not available
&& pconn._connection.state == idle //But in idle state
&& pconn._obtained != null
&& _isExpired(pconn._obtained, settings.idleTimeout)) {
_debug('Idle connection ${pconn.name}.');
_destroyConnection(pconn);
}
}
}

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