Skip to content

Default for minimum pool size: After 10 Errors DB stops working #231

Closed

Description

@bobbysmith007

Bug or feature request

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

After 10 sql errors, the application silently stops running any database code and will not execute sql any further with no indication of whats wrong. This occurs because without a minimum number of workers, the pool will wait till a worker is available, but never create any on its own.

Adding "min":3 to the datasource configuration (which is passed to pg-pool, which is passed to generic-pool) resolves this problem by assuring there are always at least 3 workers

Link to sample repo to reproduce issue (if bug)

https://github.com/bobbysmith007/loopback-error-reproductions
npm install .
npm run-script show-errors

Expected result

Running 15sql queries with errors from each

Actual result (if bug)

Running 10sql queries with it silently never running the rest

Additional information (Node.js version, LoopBack version, etc)

  • loopback: 3.4.0
  • nodejs :7.6.0

Activity

  1. ssh24 commented on Mar 28, 2017

    @ssh24
    Contributor

    @bobbysmith007 If you have a fix in place, would you mind creating a pull request?

  2. self-assigned this
    on Jul 13, 2017
  3. added this to the Sprint 40 - Apex milestone on Jul 13, 2017
  4. ssh24 commented on Jul 13, 2017

    @ssh24
    Contributor

    Should be fixed with 0697d87.

    Closing this issue. Feel free to reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions