Skip to content

Timeouts for Pooled Connections #7

Description

@256BitChris

I'm leveraging the PooledGMService class - my application has a timeout set at 10 seconds - sometimes GM operations take longer (up to several minutes).

When this happens my Java process times out as expected and returns the connection to the pool. However, this does not cause the process to be destroyed and in fact the gm process can continue processing until it's complete. Calls to ensureHealthy() on a connection in this state block until the previous command has finished.

If I detect a timeout on a non pooled connection, the close() operation will destroy the process which will stop it from taking up processing resources as soon as my application has decided it will no longer wait for the result.

Basically I'd like the ability to flag a pooled connection as unhealthy. This way it won't be reused and if I have testOnReturn enabled the process will be destroyed when it's returned to the pool.

Are there any thoughts on how to approach this? I'm willing to do make the changes but wanted to see if there were any ideas on how to best implement it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions