Skip to content

Retries are not delayed #10

@oliversalzburg

Description

@oliversalzburg

I don't know if this is an issue with pg-pubsub or promised-retry, but there are never any delays between (re)connection attempts.

2016-06-30 11:51:36.109 [DEBUG ] (                 postgres) error: too many connections for database "db"
2016-06-30 11:51:36.109                                          at Connection.parseE (C:\prj\node_modules\pg\lib\connection.js:539:11)
2016-06-30 11:51:36.109                                          at Connection.parseMessage (C:\prj\node_modules\pg\lib\connection.js:366:17)
2016-06-30 11:51:36.109                                          at Socket.<anonymous> (C:\prj\node_modules\pg\lib\connection.js:105:22)
2016-06-30 11:51:36.109                                          at emitOne (events.js:77:13)
2016-06-30 11:51:36.109                                          at Socket.emit (events.js:169:7)
2016-06-30 11:51:36.109                                          at readableAddChunk (_stream_readable.js:153:18)
2016-06-30 11:51:36.109                                          at Socket.Readable.push (_stream_readable.js:111:10)
2016-06-30 11:51:36.109                                          at TCP.onread (net.js:531:20)
2016-06-30 11:51:36.110 [DEBUG ] (                 postgres) Retry 1: Waiting 278 ms to try pubsub again
2016-06-30 11:51:36.112 [DEBUG ] (                 postgres) Error: read ECONNRESET
2016-06-30 11:51:36.112                                          at exports._errnoException (util.js:870:11)
2016-06-30 11:51:36.112                                          at TCP.onread (net.js:552:26)
2016-06-30 11:51:36.112 [DEBUG ] (                 postgres) Retry 1: Waiting 605 ms to try pubsub again
2016-06-30 11:51:36.330 [DEBUG ] (                 postgres) error: database "db" does not exist
2016-06-30 11:51:36.330                                          at Connection.parseE (C:\prj\node_modules\pg\lib\connection.js:539:11)
2016-06-30 11:51:36.330                                          at Connection.parseMessage (C:\prj\node_modules\pg\lib\connection.js:366:17)
2016-06-30 11:51:36.330                                          at Socket.<anonymous> (C:\prj\node_modules\pg\lib\connection.js:105:22)
2016-06-30 11:51:36.330                                          at emitOne (events.js:77:13)
2016-06-30 11:51:36.330                                          at Socket.emit (events.js:169:7)
2016-06-30 11:51:36.330                                          at readableAddChunk (_stream_readable.js:153:18)
2016-06-30 11:51:36.330                                          at Socket.Readable.push (_stream_readable.js:111:10)
2016-06-30 11:51:36.330                                          at TCP.onread (net.js:531:20)
2016-06-30 11:51:36.331 [DEBUG ] (                 postgres) Retry 2: Waiting 176 ms to try pubsub again
2016-06-30 11:51:36.351 [DEBUG ] (                 postgres) error: database "db" does not exist
2016-06-30 11:51:36.351                                          at Connection.parseE (C:\prj\node_modules\pg\lib\connection.js:539:11)
2016-06-30 11:51:36.351                                          at Connection.parseMessage (C:\prj\node_modules\pg\lib\connection.js:366:17)
2016-06-30 11:51:36.351                                          at Socket.<anonymous> (C:\prj\node_modules\pg\lib\connection.js:105:22)
2016-06-30 11:51:36.351                                          at emitOne (events.js:77:13)
2016-06-30 11:51:36.351                                          at Socket.emit (events.js:169:7)
2016-06-30 11:51:36.351                                          at readableAddChunk (_stream_readable.js:153:18)
2016-06-30 11:51:36.351                                          at Socket.Readable.push (_stream_readable.js:111:10)
2016-06-30 11:51:36.351                                          at TCP.onread (net.js:531:20)
2016-06-30 11:51:36.351 [DEBUG ] (                 postgres) Retry 1: Waiting 923 ms to try pubsub again
2016-06-30 11:51:36.371 [DEBUG ] (                 postgres) error: database "db" does not exist
2016-06-30 11:51:36.371                                          at Connection.parseE (C:\prj\node_modules\pg\lib\connection.js:539:11)
2016-06-30 11:51:36.371                                          at Connection.parseMessage (C:\prj\node_modules\pg\lib\connection.js:366:17)
2016-06-30 11:51:36.371                                          at Socket.<anonymous> (C:\prj\node_modules\pg\lib\connection.js:105:22)
2016-06-30 11:51:36.371                                          at emitOne (events.js:77:13)
2016-06-30 11:51:36.371                                          at Socket.emit (events.js:169:7)
2016-06-30 11:51:36.371                                          at readableAddChunk (_stream_readable.js:153:18)
2016-06-30 11:51:36.371                                          at Socket.Readable.push (_stream_readable.js:111:10)
2016-06-30 11:51:36.371                                          at TCP.onread (net.js:531:20)

It's also notable that the retry counter is off.

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