GithubHelp home page GithubHelp logo

Comments (5)

Steve-Mcl avatar Steve-Mcl commented on May 28, 2024

Hi @Marklundarn how many queries are executed from your object? I assume more than 30?

Reading up on the issue it's to do with concurrent requests and it is a limitation set by your azure package. For example if you moved up from the basic package you would get more concurrent requests.

Are these queries quite large & do they take some time to respond? If so & you are in no major hurry to get the answers back you could use a delay node-set to rate limit queries to 1 per second.

Also I haven't had a chance to look at your flow, could you post an example of a couple of queries? Perhaps it's just a case of building a dynamic where clause to perform just one query? Maybe a stored procedure and TVP would be more suitable?

from node-red-contrib-mssql-plus.

Marklundarn avatar Marklundarn commented on May 28, 2024

Hi,

Yeah, im running about 250 as a test case. Actually thought "request" was the same as "opened connections" but that doesn't seem to be the case. With the limitations of azure SQL i think the only viable solution is to concatenate into one big request. Thanks for you input! :)

/Jens

from node-red-contrib-mssql-plus.

Marklundarn avatar Marklundarn commented on May 28, 2024

Hi,

After reading up a bit more on how mssql seems to handle request/workers. It do indeed seem like 1 connection instance will always be using at least 1 worker(request) (maybe more depending on the Max DOP setting on dbServer) .

That means that if we are opening a connection for each "run" of the mssql-node and closing the connection instance after the query are done we'll risk ending upp with multiple instances of connections opened at the same time. Each connection instance using a minimum of 1 request/worker slot. This would max out the worker/requests slot almost instantly and azure would reject our connections. But if open a single connection instance and re-use it to execute our queries and then closing when all queries are executed. We would only be using 1 connection which would mean less workers/requests towards azure even with the same amount of queries. I also think that this approach would remove som overhead created by opening and closing connections for each query.

Do understand that this isn't some minor thing to do but just wanted to contribute with my thoughs on the issue :)

from node-red-contrib-mssql-plus.

UNOPARATOR avatar UNOPARATOR commented on May 28, 2024

@Marklundarn; since the limitation is regarding your Azure SQL Database Resource Limits, you might consider adding a delay node (set as a Rate Limiter) or maybe try the node-red-contrib-semaphore node instead.

from node-red-contrib-mssql-plus.

Marklundarn avatar Marklundarn commented on May 28, 2024

@Marklundarn; since the limitation is regarding your Azure SQL Database Resource Limits, you might consider adding a delay node (set as a Rate Limiter) or maybe try the node-red-contrib-semaphore node instead.

Thanks! I'll look into that :)

from node-red-contrib-mssql-plus.

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.