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
ERROR: queryObj.pause is not a function #264
Comments
thanks - "the queryObj.pause is not a function" is probably coming from q.pause() for example being called with the underlying connection being torn down. Am very time constrained currently, thanks for example code. it is not likely this will be resolved in next 1-2 months but I will keep you posted with progress as time permits. |
are you able to test query_timeout branch - this is far more change than I would have liked (I did look at it in the end but this is early build). I have only built Alpine Linux binaries so far. This will require extensive testing as the code has never before had ability to cancel a call which is blocked on server - we only supported polling based queries. Here we are having to cancel an active query whilst the cpp native code is blocked on call to stored proc. const timeoutSproc = `CREATE OR ALTER PROCEDURE <name>
AS
BEGIN
\tSET NOCOUNT ON;
\tSET XACT_ABORT ON;
\tWAITFOR DELAY '00:10'; -- 10 minutes
END;
`
it('pool: sproc with timeout early terminates - check pool', async function handler () {
const spName = 'timeoutTest'
const size = 4
const pool = env.pool(size)
await pool.promises.open()
await env.promisedCreate(spName, timeoutSproc)
try {
await pool.promises.callProc(spName, {}, { timeoutMs: 2000 })
throw new Error('expected exception')
} catch (err) {
assert(err)
assert(err.message.includes('Query cancelled'))
const res = await pool.promises.query('select 1 as n')
expect(res.first[0].n).equals(1)
} finally {
await pool.close()
}
}) |
this fix is now released |
i think this is fixed closing |
The error displayed is:
Notes:
callProc
vianew sql.Pool(options)
./opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.10.so.1.1
I can replicate this locally using a stored procedure that takes longer than the SP timeout value.
Timeout test
Stored Procedure:
Application Code:
The text was updated successfully, but these errors were encountered: