Understanding `Pool.makeWithTTL({ timeToLiveStrategy: 'usage' })`: Resource Lifecycle Management

How does Pool.makeWithTTL({ timeToLiveStrategy: 'usage'}) works? It waits until nobody uses the resource, and then waits for timeToLive and then kills the resource?

Is it ok to have configuration like this?

Pool.makeWithTTL({
      acquire: connection,
      concurrency: 1024,
      min: 1,
      max: 50,
      targetUtilization: 1,
      timeToLive: '0 seconds',
    });
Was this page helpful?