-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-912451: Error issuing heartbeat call #632
Comments
hi and thank you for raising this issue. from the looks of it, this can be perhaps a usage issue rather than a bug in the driver. can you please create a minimal viable reproduction code and post it here ? i mean, a full script which when run, exhibits the symptoms. of course please redact the sensitive information (account, user, password, etc.) |
const genericPool = require('generic-pool'); snowflakeDriver.configure({ let account; const factory = {
}, }; const myPool = genericPool.createPool(factory, opts); Added the code which shows you that how we connect the snowflake DB |
added sample code.. can you check and let me what was mistake that we are making out |
thank you for providing the sample code ! i would add the following :
Perhaps the issue pops up as synergy from 1. and 2., I'm not sure. As a super simplistic example; here's a working version of a script connecting to Snowflake using a connectionPool then executing const snowflake = require('snowflake-sdk');
snowflake.configure({ logLevel : 'trace'});
const account = process.env.SFACCOUNT;
const username = process.env.SFUSER;
const password = process.env.SFPASS;
const role = 'process.env.SFROLE';
const warehouse = process.env.SFWH;
const poolSize = 10;
const pool = snowflake.createPool(
{
account: account,
password: password,
role: role,
username: username,
warehouse: warehouse,
application: application,
timeout: 30_000,
},
{
evictionRunIntervalMillis: 30_000,
idleTimeoutMillis: 30_000,
max: poolSize,
min: 0,
},
);
pool.use(async (clientConnection) =>
{
const statement = await clientConnection.execute({
sqlText: 'select 1;',
complete: function (err, stmt, rows)
{
var stream = stmt.streamRows();
stream.on('data', function (row)
{
console.log(row);
});
stream.on('end', function (row)
{
console.log('All rows consumed');
});
}
});
}); |
since there was no response for a while now and no driver issue is identified, i'm going to close this issue. if you still think something is going wrong on the driver side, please let me know and provide a reproduction of the issue and I'll reopen to investigate further. |
Getting the below mentioned issue which is teriminating the connection in the PROD server.. Could you please let us know how to fix that..
We added clientSessionKeepAlive in the property.. but still its failing..
snowflakeDriver.configure({
insecureConnect: true,
clientSessionKeepAlive: true,
clientSessionKeepAliveHeartbeatFrequency: 3600,
});
const connectionString = {
clientSessionKeepAlive: true,
clientSessionKeepAliveHeartbeatFrequency: 3600,
};
// console.log(connectionString);
const connectionObj = snowflakeDriver.createConnection(connectionString);
{"level":"ERROR","message":"[8:11:10.002 PM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[9:11:09.636 PM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[10:11:09.637 PM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[11:11:09.637 PM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[12:11:09.637 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[1:11:09.638 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[2:11:09.637 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[3:11:09.638 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[4:11:09.639 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[5:11:09.640 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[6:11:09.638 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
{"level":"ERROR","message":"[7:11:09.640 AM]: Error issuing heartbeat call: Unable to perform operation using terminated connection."}
Failed executed statement: select concat(current_date(),':',current_time()) t1;
The text was updated successfully, but these errors were encountered: