I am looping through a large dataset (10K records) from SQL (SQL Express, local) with the data being exported into MongoDB programmatically.
For each row I return I get an [ID], and then run through another query against a linked table, to select * where ID = [ID] to get returning a number of results that I then add to a Js object as a nested object. I then run another query against another linked table, to create another nested JS object -- you get the idea.
What happens is after about 1,200+ records, I start getting SQL errors for the nested table queries:
[Error: 08001: [Microsoft][SQL Server Native Client 11.0]Shared Memory Provider: Timeout error . ]
I increased the timeout in the conn_str to 100, but still getting same error:
I suspect that because I am running SQL queries as a function within a function within a function, maybe things get bogged down?
Are there any examples of how to run multiple nested queries in NodeJS without SQL timing out?
Can you post a version of the script that exhibits the problem?
As for examples, this is a preview release, so it is not entirely vetted yet, nor do we have that many examples. However, this does sound like a problem that we want to fix sooner than later.
Closed due to inactivity.