This topic contains 2 replies, has 3 voices, and was last updated by Avatar Guindoz 4 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Avatar

    we get the following error under events The server will drop the connection, because the client driver has sent multiple requests while the session is in single-user mode. This error occurs when a client sends a request to reset the connection while there are batches still running in the session, or when the client sends a request while the session is resetting a connection. Please contact the client driver vendor.

    for sqlsvrenterprise2014.

    Event ID17886 .

    Still cant find a solution to it.Any ideas as to why this error keeps on occuring…


    [SIZE=15px]I don’t see it stated anywhere as to what version of the .NET Framework is being used, but given that this question was asked in May of 2014, and .NET Framework version 4.5 came out on 2012-08-15, the following note on SqlConnection.ConnectionString for the Asynchronous Processing / Asynckeyword seems relevant:[/SIZE]

    This property is ignored beginning in .NET Framework 4.5.

    [SIZE=15px]So, it might help to find out the exact version of Entity Framework being used, and the target version of the .NET Framework.[/SIZE]
    [SIZE=15px]However, it kinda sounds like this issue might be a result of connection pooling. I suspect connection pooling because after the error message about the connection being closed, the session was still around.[/SIZE]
    [SIZE=15px]The first thing to try is to simply disable connection pooling by adding the following to the connection string:[/SIZE]

    Pooling=false; [SIZE=15px]If the problem never comes back, then this was most likely the issue. I hesitate to say that this wasthe issue since it isn’t exactly proof. It could have merely reduced the frequency from “once every few days” to once every few weeks or even months. But, if this does improve things, yet the app hits the server frequently and you would prefer to use connection pooling if at all possible, then you can try to reintroduce connection pooling, but in limited sense: you can set a low value for the Connection Lifetime keyword:[/SIZE]

    Connection Lifetime=2; [SIZE=15px]This will have connections close upon returning to the connection pool, if they are over 2 seconds old. This allows for a series of quick query executions to go through without each of them spending time establishing the connection, while at the same time not allowing the connection to linger out there, possibly holding locks, etc.[/SIZE]
    [SIZE=15px]Even if the error still occurs, by not having connection pooling keeping the session and connection alive, that should allow for proper cleanup, releasing of locks, etc.[/SIZE]
    [HR][/HR] [SIZE=15px]Just to have this stated since it was questioned in comments on the question: Multiple Active Result Sets (MARS) is used by Entity Framework to do Lazy Loading. So if the app has been developed to use Lazy Loading, then turning off MARS is not an option.[/SIZE]

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.