azist / azos

A to Z Sky Operating System / Microservice Chassis Framework
MIT License
213 stars 29 forks source link

SIPC server threading needs to be revised as it can not do everything on one thread #786

Closed itadapter closed 1 year ago

itadapter commented 1 year ago

SipcServer.cs const int GRANULARITY_MS = 250; - that is very slow and it only accepts 1 client once every X where X is at least 250 + scanning of others. It should NOT wait that long and should accept much faster

G8 # 509

{
  "Gdid": "0:1:31027",
  "Guid": "e482cf01-5a29-4c29-8e6e-1c295f08b5f0",
  "App": "adlib",
  "Type": "Critical",
  "Source": 0,
  "UTCTimeStamp": "2022-10-14T06:04:27.967Z",
  "Host": "dsys-app-02",
  "From": "GovernorSipcClient",
  "Topic": "hgov",
  "Text": "Comm error: [System.IO.IOException] Unable to read data from the transport connection: Connection timed out.",
  "ExceptionData": {
    "TypeName": "System.IO.IOException",
    "Message": "Unable to read data from the transport connection: Connection timed out.",
    "Code": 0,
    "Source": "System.Net.Sockets",
    "StackTrace": "   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)\n   at Azos.IO.Sipc.Protocol.socketRead(NetworkStream nets, Byte[] buffer, Int32 offset, Int32 total)\n   at Azos.IO.Sipc.Protocol.Receive(TcpClient client)\n   at Azos.IO.Sipc.SipcClient.tryConnect()",
    "AppId": "adlib",
    "AppName": "adlib",
    "ExternalStatus": null,
    "InnerException": {
      "TypeName": "System.Net.Sockets.SocketException",
      "Message": "Connection timed out",
      "Code": 0,
      "Source": "System.Net.Sockets",
      "StackTrace": "   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)",
      "AppId": "adlib",
      "AppName": "adlib",
      "ExternalStatus": null,
      "InnerException": null
    }
  }
}
zhabis commented 1 year ago

Nothing works. All fall into limbo with SipcException

zhabis commented 1 year ago

Looks like everything is good. marking as RTM

itadapter commented 1 year ago

done