Skip to content

Poco::Data::SessionPool: avoid sessions staying idle too long #3951

@obiltschnig

Description

@obiltschnig

On a very high-volume server it has been noticed that sessions created early in the server's life would stay idle for a very long time, eventually running into a server's session timeout and being closed by the (MySQL) server. Regular housekeeping would not purge these sessions, due to the minimum number of idle sessions to keep requirement. Eventually, such a session would be used, but trigger a failure (due to it being terminated by the server). This situation can be avoided by better cycling through idle sessions. Currently, when a session is returned to the pool, it is returned to the front of the idle list. I.e., the most recent session returned would also be the next one to be handed out again (LIFO). Change the behavior to FIFO.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions