We are experiencing a strange problem we weren't able to reproduce as it is only happening sometimes.
The issue is that sometime a query returns empty when it should contain data. If run again, it normally returns the data you would expect it to. It seems that it mostly happens when the server is under high load.
We are using an ORM in .NET and connecting to a Microsoft SQL Server. It doesn't matter which Version of the SQL Server we are using, we experienced it through every version we ever used (2012 to 2017). As an ORM we were using Nhibernate until now but as we are porting the whole project to .NET Core we switched to Entity Framework Core and while testing something I experienced this problem once with EF Core 3.
Multiple people checked our code and could not find anything. I also wasn't able to replicate the issue with simply producing 100% load on the machine by running prime95 or something similar.
For one of our installations we switched to PostgreSQL and the problem never came up there. One of my colleagues thinks he remembers having the issue once in the SQL Management Studio, but that never occured again.
Has anybody seen this or something similar and/or knows how to fix it?