You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This suggests that the password is incorrect but we haven't changed it. I can run the same query from pgadmin logged in as the same user without any issue. We are printing out the password being used for the connection and it is correct. If we run the query over and over it will sometimes work and sometimes fail (doesn't seem to be any rhyme or reason as to when it works versus when it fails. It probably only works 1 out of every 10 tries.
Here is how the query is being run:
pg.connect(this.connectionOptions, function(err, client, done){
if(err){
// this is where the failure happens so the query isn't even attempted
done();
connectionErrorCb(new ApiError(httpCodes.SERVER_ERROR, errorCode, {code:DBG_ERR.DB_CONN_FAILURE, more: err}));
return;
}
client.query(query, function(err, result){
done();
if(err){
var code = DBG_ERR.QUERY_FAILURE;
if(err.detail){
code = err.detail;
}
err = new ApiError(httpCodes.SERVER_ERROR, errorCode, {code: code, message: err.message, err: err});
}
successCb(err, result);
});
});
If we roll back Node to v4.6.1 then the problem goes away. This issue seems related to #1000 and #1018 which are supposedly fixed but it seems like there is still a way the issue can crop up.
This is a really big problem for our software so I'm happy to assist with additional debugging information to help track the problem down.
Thanks!
The text was updated successfully, but these errors were encountered:
Is your connection parameter a connection object or a connection string? There was a bug introduced in 6.x version for connection strings at some point.
@vitaly-t Thanks for the response. Turns out this was user error. The bug I was having was the same bug in #1000 and #1018 but I wasn't actually running node-postgres 6.9.1. My main module was dependent on another module that was actually running the query and it was using an older version of pg. After updating that submodule the issue is resolved.
When running the following versions:
We intermittently get the following error when attempting to connect to the database:
This suggests that the password is incorrect but we haven't changed it. I can run the same query from pgadmin logged in as the same user without any issue. We are printing out the password being used for the connection and it is correct. If we run the query over and over it will sometimes work and sometimes fail (doesn't seem to be any rhyme or reason as to when it works versus when it fails. It probably only works 1 out of every 10 tries.
Here is how the query is being run:
If we roll back Node to
v4.6.1
then the problem goes away. This issue seems related to #1000 and #1018 which are supposedly fixed but it seems like there is still a way the issue can crop up.This is a really big problem for our software so I'm happy to assist with additional debugging information to help track the problem down.
Thanks!
The text was updated successfully, but these errors were encountered: