dmanjunath / node-redshift

A simple collection of tools to help you get started with Amazon Redshift from node.js
69 stars 48 forks source link

using redshift pool .. This socket has been ended by the other party #8

Closed windjay closed 7 years ago

windjay commented 7 years ago

var redshift_info = { user: 'dsi', database: 'id...', password: 'pass', port: '5439', host: 'aws.xxxxxx.com, max: 10, // max number of clients in the pool idleTimeoutMillis: 5000, }; var redshiftClient = new redshift(redshift_info, {rawConnection: false});

and insert some data to redshift .. at first insert ok... some data insert to redshift but after that i got below error

2017-01-17 01:59:25 - error: Error: This socket has been ended by the other party at Socket.writeAfterFIN [as write] (net.js:291:12) at Connection.query (/app/node-server/node_modules/pg/lib/connection.js:204:15) at Query.submit (/app/node-server/node_modules/pg/lib/query.js:138:16) at Client._pulseQueryQueue (/app/node-server/node_modules/pg/lib/client.js:307:24) at Client.query (/app/node-server/node_modules/pg/lib/client.js:335:8) at runQuery (/app/node-server/node_modules/node-redshift/lib/query.js:37:15) at Redshift.query (/app/node-server/node_modules/node-redshift/lib/query.js:33:8)

dmanjunath commented 7 years ago

@windjay Every now and them redshift takes all your connections down during the maintanance window. Can you verify that Amazon wasn't doing maintenance? You can find out by looking here in the AWS Redshift status page

redshift_ _aws_console

schmidp commented 7 years ago

Might be related to: https://github.com/dmanjunath/node-redshift/pull/10

dmanjunath commented 7 years ago

Merged and published

neilpalima commented 4 years ago

@dmanjunath how can I set max and min connection pools? Is this possible? Putting max does not seem to work on my end.