Performance Recommendations? #518
Replies: 3 comments 2 replies
-
|
There's no maximum number of connections allowed by SQL 4 CDS. There may be some limits from the underlying infrastructure. I'd be interested to understand where the delay is coming from if you're able to investigate any further. For example, if you're opening a connection using a connection string like: var con = new Sql4CdsConnection("AuthType=ClientSecret;url=https://contosotest.crm.dynamics.com;ClientId={AppId};ClientSecret={ClientSecret}");you could try breaking this down into establishing the underlying var svc = new ServiceClient("AuthType=ClientSecret;url=https://contosotest.crm.dynamics.com;ClientId={AppId};ClientSecret={ClientSecret}");
var con = new Sql4CdsConnection(svc); |
Beta Was this translation helpful? Give feedback.
-
|
I guess you're hitting some other server-side error which the service client is automatically retrying, like a service protection limit or similar. |
Beta Was this translation helpful? Give feedback.
-
|
@MarkMpn Hi Mark, I have same same question, can the connection stay open? I see the code, it's not implementing open and close method, does it mean it's not actually 'open' so does not need close? I have this question because I found open the connection will bring some query initially take some seconds, so if I use it as regular sql connection, it bring latency because of frequently close/open connection. So I wondering if we could use a singleton connection? |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Would you have any performance recommendations in regards to managing connections?
I have a Azure Durable Function, which opens several concurrent connections to the Dataverse using SQL4CDS to read data only.
I noticed After about 5 connections, the opening of subsequent connections are slower from milliseconds to seconds.
Would you know if there is max amount of connections allowed to be open.
Also I am curios would you know how long connection would stay open for, if I choose to pass it around?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions