+ Reply to Thread
Results 1 to 5 of 5

sqlclient: existing connection was forcibly closed

  1. sqlclient: existing connection was forcibly closed


    i just made the switch from OLEDB to SqlClient in my .Net apps.

    now with SqlClient often my db calls throw the following exception:

    System.Data.SqlClient.SqlException: A transport-level error has occurred
    when sending the request to the server. (provider: TCP Provider, error: 0 -
    An existing connection was forcibly closed by the remote host.) at
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean
    breakConnection) at...

    this happens when the load (or call rate) increases. I don't think its
    anything I am doing unless I am missing a connect option.

    my production environment is:
    client side
    Windows Server 2003 sp2
    ..net 2.0

    server side
    Windows Server 2003 sp2
    Sql Server 2005 sp2

    Also, on my development machine running Vista, it does not appear that this
    happens.




  2. Re: sqlclient: existing connection was forcibly closed

    Some associated links:
    http://forums.microsoft.com/TechNet/...4053&SiteID=17

    http://channel9.msdn.com/ShowPost.aspx?PostID=239593


    This is what someone else who had this issue did:
    >>

    I went into the Sql Server Configuration Manager, Sql Native Client
    Configuration -> Protocols and disabled Shared Memory and made the TCP/IP
    protocol #1 in order. Then just restarted the Sql Service and it all
    started
    working!
    <<

    --
    Andrew J. Kelly SQL MVP

    "pb" wrote in message
    news:1CF8C7D3-F472-46CF-8F8F-467545DA869F@microsoft.com...
    >
    > i just made the switch from OLEDB to SqlClient in my .Net apps.
    >
    > now with SqlClient often my db calls throw the following exception:
    >
    > System.Data.SqlClient.SqlException: A transport-level error has occurred
    > when sending the request to the server. (provider: TCP Provider, error:
    > 0 -
    > An existing connection was forcibly closed by the remote host.) at
    > System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    > Boolean
    > breakConnection) at...
    >
    > this happens when the load (or call rate) increases. I don't think its
    > anything I am doing unless I am missing a connect option.
    >
    > my production environment is:
    > client side
    > Windows Server 2003 sp2
    > .net 2.0
    >
    > server side
    > Windows Server 2003 sp2
    > Sql Server 2005 sp2
    >
    > Also, on my development machine running Vista, it does not appear that
    > this
    > happens.
    >
    >
    >




  3. Re: sqlclient: existing connection was forcibly closed

    Hi,

    May be this can help also

    http://blogs.msdn.com/sql_protocols/...eShooting.aspx

    Thanks
    Omar

    "Andrew J. Kelly" wrote:

    > Some associated links:
    > http://forums.microsoft.com/TechNet/...4053&SiteID=17
    >
    > http://channel9.msdn.com/ShowPost.aspx?PostID=239593
    >
    >
    > This is what someone else who had this issue did:
    > >>

    > I went into the Sql Server Configuration Manager, Sql Native Client
    > Configuration -> Protocols and disabled Shared Memory and made the TCP/IP
    > protocol #1 in order. Then just restarted the Sql Service and it all
    > started
    > working!
    > <<
    >
    > --
    > Andrew J. Kelly SQL MVP
    >
    > "pb" wrote in message
    > news:1CF8C7D3-F472-46CF-8F8F-467545DA869F@microsoft.com...
    > >
    > > i just made the switch from OLEDB to SqlClient in my .Net apps.
    > >
    > > now with SqlClient often my db calls throw the following exception:
    > >
    > > System.Data.SqlClient.SqlException: A transport-level error has occurred
    > > when sending the request to the server. (provider: TCP Provider, error:
    > > 0 -
    > > An existing connection was forcibly closed by the remote host.) at
    > > System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    > > Boolean
    > > breakConnection) at...
    > >
    > > this happens when the load (or call rate) increases. I don't think its
    > > anything I am doing unless I am missing a connect option.
    > >
    > > my production environment is:
    > > client side
    > > Windows Server 2003 sp2
    > > .net 2.0
    > >
    > > server side
    > > Windows Server 2003 sp2
    > > Sql Server 2005 sp2
    > >
    > > Also, on my development machine running Vista, it does not appear that
    > > this
    > > happens.
    > >
    > >
    > >

    >
    >
    >


  4. Re: sqlclient: existing connection was forcibly closed

    I saw that post regarding flipping off Shared Memory. I tried it and it
    seems to work.

    I wonder:
    -does Microsoft know about this?
    and
    -Why aren't more people seeing it?

    The box that runs my SQL Server instance also runs a series of processes
    that access the db, these processes might automatically use the shared memory
    model vs. TCP (although I am not changing the connectstr, I still specify
    TCP). Perhaps my situation is more stressful than others causing this bug to
    appear.


    "Andrew J. Kelly" wrote:

    > Some associated links:
    > http://forums.microsoft.com/TechNet/...4053&SiteID=17
    >
    > http://channel9.msdn.com/ShowPost.aspx?PostID=239593
    >
    >
    > This is what someone else who had this issue did:
    > >>

    > I went into the Sql Server Configuration Manager, Sql Native Client
    > Configuration -> Protocols and disabled Shared Memory and made the TCP/IP
    > protocol #1 in order. Then just restarted the Sql Service and it all
    > started
    > working!
    > <<
    >
    > --
    > Andrew J. Kelly SQL MVP
    >
    > "pb" wrote in message
    > news:1CF8C7D3-F472-46CF-8F8F-467545DA869F@microsoft.com...
    > >
    > > i just made the switch from OLEDB to SqlClient in my .Net apps.
    > >
    > > now with SqlClient often my db calls throw the following exception:
    > >
    > > System.Data.SqlClient.SqlException: A transport-level error has occurred
    > > when sending the request to the server. (provider: TCP Provider, error:
    > > 0 -
    > > An existing connection was forcibly closed by the remote host.) at
    > > System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    > > Boolean
    > > breakConnection) at...
    > >
    > > this happens when the load (or call rate) increases. I don't think its
    > > anything I am doing unless I am missing a connect option.
    > >
    > > my production environment is:
    > > client side
    > > Windows Server 2003 sp2
    > > .net 2.0
    > >
    > > server side
    > > Windows Server 2003 sp2
    > > Sql Server 2005 sp2
    > >
    > > Also, on my development machine running Vista, it does not appear that
    > > this
    > > happens.
    > >
    > >
    > >

    >
    >
    >


  5. Re: sqlclient: existing connection was forcibly closed

    Yes generally the applications on the same box will use shared memory when
    they can and if you have a lot of activity here it may be the issue.

    --
    Andrew J. Kelly SQL MVP

    "pb" wrote in message
    news:A1D168B9-A615-4D77-B3EA-710A80BA6201@microsoft.com...
    >I saw that post regarding flipping off Shared Memory. I tried it and it
    > seems to work.
    >
    > I wonder:
    > -does Microsoft know about this?
    > and
    > -Why aren't more people seeing it?
    >
    > The box that runs my SQL Server instance also runs a series of processes
    > that access the db, these processes might automatically use the shared
    > memory
    > model vs. TCP (although I am not changing the connectstr, I still specify
    > TCP). Perhaps my situation is more stressful than others causing this bug
    > to
    > appear.
    >
    >
    > "Andrew J. Kelly" wrote:
    >
    >> Some associated links:
    >> http://forums.microsoft.com/TechNet/...4053&SiteID=17
    >>
    >> http://channel9.msdn.com/ShowPost.aspx?PostID=239593
    >>
    >>
    >> This is what someone else who had this issue did:
    >> >>

    >> I went into the Sql Server Configuration Manager, Sql Native Client
    >> Configuration -> Protocols and disabled Shared Memory and made the TCP/IP
    >> protocol #1 in order. Then just restarted the Sql Service and it all
    >> started
    >> working!
    >> <<
    >>
    >> --
    >> Andrew J. Kelly SQL MVP
    >>
    >> "pb" wrote in message
    >> news:1CF8C7D3-F472-46CF-8F8F-467545DA869F@microsoft.com...
    >> >
    >> > i just made the switch from OLEDB to SqlClient in my .Net apps.
    >> >
    >> > now with SqlClient often my db calls throw the following exception:
    >> >
    >> > System.Data.SqlClient.SqlException: A transport-level error has
    >> > occurred
    >> > when sending the request to the server. (provider: TCP Provider, error:
    >> > 0 -
    >> > An existing connection was forcibly closed by the remote host.) at
    >> > System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    >> > Boolean
    >> > breakConnection) at...
    >> >
    >> > this happens when the load (or call rate) increases. I don't think its
    >> > anything I am doing unless I am missing a connect option.
    >> >
    >> > my production environment is:
    >> > client side
    >> > Windows Server 2003 sp2
    >> > .net 2.0
    >> >
    >> > server side
    >> > Windows Server 2003 sp2
    >> > Sql Server 2005 sp2
    >> >
    >> > Also, on my development machine running Vista, it does not appear that
    >> > this
    >> > happens.
    >> >
    >> >
    >> >

    >>
    >>
    >>




+ Reply to Thread