SAP Knowledge Base Article - Preview

2502711 - Connection died while writing to socket. Socket returned error code 10054. - SDK for SAP ASE

Symptom

  • An application received the following error which had not been seen before:

Inner Exception : ERROR [08S01] [SAP][ASE ODBC Driver]Connection to the server has been lost. Connection died while writing to socket. Socket returned error code 10054. Check the server to determine the status of any open transactions.

  • No errors or messages in the ASE errorlog.
  • A new application release went out 1-2 days ago.
  • Warnings were logged on two affected Windows client hosts:

    • ------- 1st --------
       
      WARNING:
       
      Event code: 3005
      Event message: An unhandled exception has occurred.
      Event time: 6/26/2017 4:47:03 AM
      Event time (UTC): 6/26/2017 9:47:03 AM
      Event ID: 2c01be7088b5466cbc04124046436c8b
      Event sequence: 6853
      Event occurrence: 1
      Event detail code: 0
       
      Application information:
          Application domain: /XX/XXXXXX/ROOT-1-131429271052829602
          Trust level: Full
          Application Virtual Path: /
          Application Path: D:\Sites\xxxxx\
          Machine name: XXXXXXX
       
      Process information:
          Process ID: 8008
          Process name: w3wp.exe
          Account name: NT AUTHORITY\NETWORK SERVICE
       
      Exception information:
          Exception type: TargetInvocationException
          Exception message: Exception has been thrown by the target of an invocation.
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
         at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
         at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
         at AIM.Framework.Web.UI.AIMUserControl.ControllerInvoke(String name, Object[] args) in xxxUserControl.cs:line 74
         at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
         at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       
      The connection has been disabled.

         at System.Data.Odbc.OdbcConnection.ConnectionIsAlive(Exception innerException)
         at System.Data.Odbc.OdbcConnection.HandleErrorNoThrow(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
         at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
         at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
         at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
         at Dapper.SqlMapper.<QueryImpl>d__11`1.MoveNext()
         at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         at Dapper.SqlMapper.Query[T](IDbConnection cnn, CommandDefinition command)
         at xxx.DataAccess.Infrastructure.DbCommandExecutor.Query[T](IDbConnection connection, String baseSql, DynamicParametersWrapper parameters, IDbTransaction transaction, String commandName, CommandType commandType, Boolean hasNamedParameters)
         at xxxxntake.DataAccess.Repositories................
           at Controllers.Interfaces...................................
       
      ERROR [08S01] [SAP][ASE ODBC Driver]Connection to the server has been lost. Connection died while writing to socket. Socket returned error code 10054. Check the server to determine the status of any open transactions. 
       
      Request information:
          Request URL: http://xxxxxxx.xxxxx.com/XXxxx.aspx
          Request path: /XXV.aspx
          User host address: XXX.XX.X.XXX 
          User: 
          Is authenticated: False
          Authentication Type: 
          Thread account name: NT AUTHORITY\NETWORK SERVICE
       
      Thread information:
          Thread ID: 363
          Thread account name: NT AUTHORITY\NETWORK SERVICE
          Is impersonating: False
          Stack trace:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
         at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
         at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
         at xxxx.Framework.Web.UI.xxxxControl.ControllerInvoke(String name, Object[] args) in xxxxxx.cs:line 74
         at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
         at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       
    • ------- 2nd -------- 
       
      Event code: 3005
      Event message: An unhandled exception has occurred.
      Event time: 6/26/2017 6:27:26 AM
      Event time (UTC): 6/26/2017 11:27:26 AM
      Event ID: 59160f86f6224930b26595350351c60e
      Event sequence: 9719
      Event occurrence: 5
      Event detail code: 0
       
      Application information:
          Application domain: /XX/XXXXX/2/ROOT-1-131429271015624673
          Trust level: Full
          Application Virtual Path: /
          Application Path: D:\Sites\xxxxx\
          Machine name: XXXXXXX121
       
      Process information:
          Process ID: 5108
          Process name: w3wp.exe
          Account name: NT AUTHORITY\NETWORK SERVICE
       
      Exception information:
          Exception type: InvalidOperationException
          Exception message: The connection has been disabled.
         at System.Data.Odbc.OdbcConnection.ConnectionIsAlive(Exception innerException)
         at System.Data.Odbc.OdbcConnection.HandleErrorNoThrow(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
         at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
         at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
         at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
         at xxxxxxx.SqlMapper.<QueryImpl>d__11`1.MoveNext()
         at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         at xxxxxxx.SqlMapper.Query[T](IDbConnection cnn, CommandDefinition command)
         at xxx.DataAccess.Infrastructure.DbCommandExecutor.Query[T](IDbConnection connection, String baseSql, DynamicParametersWrapper parameters, IDbTransaction transaction, String commandName, CommandType commandType, Boolean hasNamedParameters)
         ...................xxxxxx.cs:line 5979
         ................................................
         at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
         at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       
      ERROR [08S01] [SAP][ASE ODBC Driver]Connection to the server has been lost. Connection died while writing to socket. Socket returned error code 10054. Check the server to determine the status of any open transactions. 
       
      Request information:
          Request URL: http://xxxxxxx.xxxxxx.com/Default.aspx
          Request path: /Default.aspx
          User host address: XXX.XX.X.XXX 
          User: 
          Is authenticated: False
          Authentication Type: 
          Thread account name: NT AUTHORITY\NETWORK SERVICE
       
      Thread information:
          Thread ID: 242
          Thread account name: NT AUTHORITY\NETWORK SERVICE
          Is impersonating: False
          Stack trace:    at System.Data.Odbc.OdbcConnection.ConnectionIsAlive(Exception innerException)
         at System.Data.Odbc.OdbcConnection.HandleErrorNoThrow(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
         at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
         at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
         at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
         at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
         at Dapper.SqlMapper.<QueryImpl>d__11`1.MoveNext()
         at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         at Dapper.SqlMapper.Query[T](IDbConnection cnn, CommandDefinition command)
         at xxxxx.DataAccess.Infrastructure.DbCommandExecutor.Query[T](IDbConnection connection, String baseSql, DynamicParametersWrapper parameters, IDbTransaction transaction, String commandName, CommandType commandType, Boolean hasNamedParameters)
         ............................

Read more...

Environment

  • SAP Adaptive Server Enterprise (ASE) 16.0 SP02 PL04 on AIX 7.1
  • SAP Sybase Software Developer Kit (SDK) 15.7 on Windows
    • Adaptive Server Enterprise ODBC Driver by Sybase

Product

SAP Adaptive Server Enterprise 16.0 ; Sybase Software Developer Kit 15.7

Keywords

WSAECONNRESET, setsockopt, SO_LINGER,keep-alive, peer , KBA , BC-SYB-SDK , SDK , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.