-
Notifications
You must be signed in to change notification settings - Fork 471
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
Request timeouts in mssql/msnodesqlv8 when using default Pool size #1628
Comments
As I understand it, this is essentially a NFR test which is to check that you can perform 100 transactions within 2 seconds? Your request timeout is 2000ms, you're running 100 transactions in parallel expecting them all to complete before any timeouts are fired. Whilst I understand that it may be frustrating that one driver meets this requirement but another doesn't, that is likely to be the nature of different drivers (they have different performance characteristics). For there to be a convincing case that there is a problem inherently with this library (and not just the underlying driver), I think we'd need to be able to prove the driver can meet the NFRs in a direct implementation, otherwise it's just a performance limitation with the driver and that's something to be raised with the author of that library. Of course, these kinds of performance requirements are also going to be subject to the hardware/infrastructure that the test or application is running on. This test passing locally or on CI isn't a guarantee it'll pass on the production infrastructure. |
@dhensby as far as I read the post, it is not performance related because it works when the pool size is reduced. @remz can you elaborate more on this issue? What exactly works and what fails? Do some of the promises resolves and not all within the time frame (which could indeed point to a performance issue), or do you only have one (or non?) of the promises resolve in that case? |
@Laurensvanrun good spot, I had missed that detail. Bizarre that it succeeds when the pool size is smaller, I wonder if there's something about the way The pooling logic is identical regardless of the driver, so I'm struggling to see how this could be anything other than a quirk with |
@dhensby Thanks for your feedback/suggestions |
I am switching from
mssql
(Tedious) tomssql/msnodesqlv8
, because we need Windows Authentication support in ourNode.js
service. However after switching I run into the following issue.We have a test that checks if there are no race conditions while getting a new id from the database.
To make this operation atomic a
TABLOCKX
is used inside a transaction.The tests starts 100 promises in parallel and checks if 100 unique numbers are generated in the end.
This test succeeds without any issues when using the
mssql
(Tedious) driver.However using
mssql/msnodesqlv8
, the test fails with the default pool size of10
.Expected behaviour:
I would expect the test to show the same behavior as when using
mssql
.Actual behaviour:
Using
mssql/msnodesqlv8
, the test fails with the default pool size of10
.(it fails with request timeout errors)
When I set the pool size to
4
, the test succeeds. Using any bigger pool size will fail the test.Questions:
Thanks in advance for any help
Configuration:
The related table is defined as follows:
I tried to reduce the code to the simplest version possible, to make sure this issue is not related to my own code.
The test code;
Software versions
v16.17.1
10.0.2
4.1.2
Microsoft SQL Server 2012 (SP3-GDR)
The text was updated successfully, but these errors were encountered: