Skip to content

unhandledRejection: Promise { <rejected> TypeError [ERR_MISSING_ARGS]: The "options" or "port" or "path" argument must be specified #252

Closed
@700software

Description

@700software
unhandledRejection: Promise {
  <rejected> TypeError [ERR_MISSING_ARGS]: The "options" or "port" or "path" argument must be specified
      at new NodeError (node:internal/errors:329:5)
      at Socket.connect (node:net:932:11)
      at Object.connect (node:net:197:17)
      at Object.connect (C:\...\node_modules\postgres\lib\connection.js:390:13) {
    code: 'ERR_MISSING_ARGS'
  }
}

This error occurs intermittently.

I have an unusual config here: { ..., idle_timeout:1, max:5 }

Error is occuring here:

: net.connect(

When error occurs it is because i == 1 but I only have one host and port so net.connect is called with options undefined, undefined instead of the port number.

I think what is happening is multiple connections are trying to be reopened simultaneously

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions