Giter Site home page Giter Site logo

Comments (4)

Laurensvanrun avatar Laurensvanrun commented on June 11, 2024 1

@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?

from node-mssql.

dhensby avatar dhensby commented on June 11, 2024

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.

from node-mssql.

dhensby avatar dhensby commented on June 11, 2024

@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 msnodesqlv8 is queuing requests that could cause some to push ahead, leaving some to timeout because of the lock...

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 msnodesqlv8, but we'd need it implemented directly with that library to know for sure.

from node-mssql.

remz avatar remz commented on June 11, 2024

@dhensby Thanks for your feedback/suggestions
The remarkable thing is that one of the promises usually succeeds and the rest fail with request timeouts.
Even if I increase the request timeout to 45 seconds, the requests still fail with timeouts
So there seems to be some kind of locking issue that prevents the transactions to progress as soon as the pool size is larger than 4.
Trying to use msnodesqlv8 directly (so without the mssql wrapper) is a good suggestion, I will give that a try..

from node-mssql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.