Module: ConnectionPool

XDevAPI implementation of a connection pool. Should be used via the Client API.


const pool = mysqlx.getClient('mysqlx://root@localhost', {
  pooling: {
    enabled: true,
    maxSize: 10,
    maxIdleTime: 20000,
    queueTimeout: 5000

  .then(session => {
    // A new session is created using a connection from the pool.

Type Definitions


Connection pool configuration properties.
  • Object
Name Type Argument Default Description
enabled boolean <optional>
true use a connection pool
maxSize number <optional>
25 maximum number of connections in the pool
maxIdleTime number <optional>
0 maximum number of milliseconds to allow a connection to be idle (0 - infinite)
queueTimeout number <optional>
0 maximum number of milliseconds to wait for a connection to become available (0 - infinite)