Skip to content

Service Client is not reusing an existing connection #306

Closed

Description

@kwu022

It seems like every time a new ServiceClient is returning a new connection (re-login to D365), although we have passed RequireNewInstance=false in the connection string, which uses client and secret.

It doesn't happen in the old .Net SDK. Below are traces for the different queries initiated from a Function App (different sessions and different method calls).

image

Activity

  1. MattB-msft commented on Aug 21, 2022

    @MattB-msft
    Member

    Thanks for your report,
    We will take a look at this.

  2. added
    Investigating
    on Aug 21, 2022
  3. removed
    Investigating
    on Feb 14, 2023
  4. MattB-msft commented on Feb 14, 2023

    @MattB-msft
    Member

    kwu022 , we have identified a bug in this behavior that would cause this pattern fault if the previous connection was disposed. We are going to move to a newer pattern for this:

    if a connection is created to an instance with use unique = false, then disposed.
    then the next connection contains use unique = false, will run the 'restart' behavior to connect to the instance,

    if a connection is created to an instance with use unique = false,
    then the next connection contains use unique = false, we will reuse the settings from the first connection.

    Note, this default behavior for use unique is 'true'.

  5. added
    bug
    on Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions