English is not my native language; please excuse typing errors.
My project run in IIS with .net core 3.1 ServiceStack.OrmLite -v 5.7 System.Data.SqlClient last version 4.8.1
the issue is query Table OrderMain absolutely exist rows return other table's rows or return empty Sometimes there's a few days in between, while other times there are multiple errors per day.The average daily interface request volume of my website should be around 2 million
var order = Db.Single(x => x.OrderNo == "1234");
if (order == null )
{
Logger.Error($"order not found");
order = Db.Single(x => x.OrderNo == "1234");
if (order != null)
{
Logger.Error("order found by second query");
}
}
Similar question Why is my SqlCommand returning a string when it should be an int?
And other times some network abnormalities are recorded in the log, It seems that this exception has nothing to do with the database, but in similar questions, he also appeared in these two situations at the same time
The client has disconnected
at Microsoft.AspNetCore.Server.IIS.Core.IO.AsyncIOOperation.GetResult(Int16 token)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.ReadBody()
at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
at System.IO.Pipelines.Pipe.GetReadAsyncResult()
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.ReadAsync(Memory`1 memory, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.IIS.Core.HttpRequestStream.ReadAsyncInternal(Memory`1 buffer, CancellationToken cancellationToken)
at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at ServiceStack.StreamExtensions.CopyToNewMemoryStreamAsync(Stream stream) in C:\ServiceStack.Text-5.7\src\ServiceStack.Text\StreamExtensions.cs:line 517
System.Runtime.InteropServices.COMException (0x80070040): The specified network name is no longer available。 (0x80070040)
User contributions licensed under CC BY-SA 3.0