Comments (5)
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.
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.
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.
@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; 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)
- Feature request: Allow variable server IP and Passwords HOT 3
- Feature request: automatic retry on error
- Additional Authentication Methods for Azure SQL HOT 3
- Bulk Insert random insertion on the table
- Instance Name HOT 2
- Multiple queries doesn't show multiple record set
- Does not install with nodejs 20 (@azure/msal-node issue) HOT 7
- SQL Server 2022 HOT 1
- Bulk insert does not work. HOT 11
- I would need "ApplicationIntent=ReadOnly" in the SQL connection string HOT 3
- Environment variables do not appear to be working ? HOT 1
- Support for Node.js 20 HOT 2
- bigint being returned as a string HOT 1
- error: cannot read property 'on' of undefined HOT 3
- Node red crashed due to an sql error
- Version 0.12.1 suddenly becomes dependent on @azure/core-rest-pipeline Version 1.13.0 which breaks on latest NodeRED HOT 3
- Uncaught Exception while stopping flows (during deploy) HOT 1
- Expected minimum version of Node (>=18) should be reflected in package.json (>=12). HOT 3
- Older SQL Node are not properly configured HOT 12
- Azure AD authentication
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-mssql-plus.