none
SQL Server 2005 Error: 17886, Severity: 20, State: 1 RRS feed

  • Question

  • Hi.

    We are running ASP.NET 3.5 with nHibernate 2.0 and using separate SQLDataReaders.  All SQLClient connections are going through a single connection string using MARS (MultipleActiveResultSets=true).

    On SQL Server we are seeing many exceptions with the following error:

    Error: 17886, Severity: 20, State: 1

    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.
    Wednesday, January 14, 2009 5:44 PM

All replies

  • Ok, you are in luck, I ran into this a few weeks ago.  If you set Async=true on the connection string it should prevent this problem.   If you are using MARS and using the same connection on multiple concurrent threads what can happen is the call to reset the connection can get slightly delayed and trigger this error.  If you set Async=true we perform additional locking in the client driver to prevent this from happening.
    Monday, October 19, 2009 7:01 PM
    Moderator
  • I got this problem too, But when I set Async=true to connection string, SQL Server get the exception. What's happening?

    string conString = System.Configuration.ConfigurationManager.ConnectionStrings["ProjectConnectionString"].ConnectionString;
            conString += "Asynchronous Processing=True;MultipleActiveResultSets=True;";

    Monday, August 25, 2014 3:32 AM
  • Hi Matt,

    According to System.Data.SqlClient documentation the Async property is ignored with .NET 4.5: https://msdn.microsoft.com/fr-fr/library/system.data.sqlclient.sqlconnectionstringbuilder.asynchronousprocessing(v=vs.110).aspx

    I'm using MARS with .NET 4.5 and encounter this error, do you think that activating "Async" will still help to solve the issue?

    Thursday, August 24, 2017 8:13 AM