c# - Azure SQL hitting worker process cap ignoring pool size -
i have store lot of rows in sql. here pseudo code in c# had:
using (var con = new sqlconnection(configurationmanager.connectionstrings["datacontext"].connectionstring)) { await con.openasync(); var sc = new sqlcommand("insertupdatemyobject", con); sc.commandtype = commandtype.storedprocedure; sc.parameters.addwithvalue("code", h.code); await sc.executenonqueryasync(); // 2 more stored proc calls } i have moved 3 stored procedures one, limit executions of sqlcommands. there 1 int output parameter contains scope_identity(). have added in connection string:
multipleactiveresultsets=false;encrypt=true;trustservercertificate=false;connection timeout=30;connectretrycount=3;connectretryinterval=10;transparentnetworkipresolution=false;max pool size=60
also tried add asynchronous processing=true; connection string.
i have set max pool size 60 because using s0 azure sql database. not want scale s1, s2 or s3. want code execution not throw exceptions , wait bit longer before next execution. running console app .net 4.6.2 retry part in connection string supported.
when run sql part 100 times, 1 aggregate exception containing on 60 inner exceptions:
it's dutch , says like:
timeout expired. timeout period elapsed prior completion of operation or server not responding
and below:
timeout expired. timeout period elapsed prior obtaining connection pool. may have occurred because pooled connections in use , max pool size reached.
my stored proc inserts , deletes on 3 tables , returns in int (output param) new primary key of 1 of tables. (main, parent table has 2 child, tables)
seems bit max pool size reached error parallel connections have no datareader or table. there 1 int output. ps. app 1 hitting azure db.

Comments
Post a Comment