Hi, I am doing a greater amount of data insert via Stored Procedure on a database at
database.windows.net from a NodeJS appliactioin running on Azure and after about 200-300 inserts I get theese errors:
{ [ConnectionError: Failed to connect to zj8i8n25gv.database.windows.net:1433 - connect EADDRINUSE]
name: 'ConnectionError',
message: 'Failed to connect to zj8i8n25gv.database.windows.net:1433 - connect EADDRINUSE',
code: 'ESOCKET' }
Typically when I run about 400 calls to a stored procedure to insert some data, about 100 of them will fail with this error.
When I run the application on my local computer it seems that I get fewer errors, sometimes none or only a few will fail.
- Is this problem connected to running it on the Azure cloud? (Is there a fixed set of ports/sockets/connections available)
- Or is this problem on Microsofts cloud database at database.windows.net?
- Should I try to distribute thoose inserts over a greater time period, by "baking" Stored Procedures Inserts into a Promise and only running a few at the time, and trigger the next batch-insert after the previous as been done. Is there some best practice on how many insert/calles you can do in one batch?