We had a solution that had severe performance issues when it got a lot of visitors. Sitecore was casting the following exception and Solr had similar errors in its logs:
“Unable to read data from the transport connection: The connection was closed”
We recognized that the problem was caused by hitting the network bandwidth in the Azure!
Yes, there were a lot of visitors, true but enough were there to hit the bandwidth limit. The customer upgraded the plan to get more network bandwidth, but still the issues continued to arise.
But what is the issue that stops them from getting the result?
Once the review started of the Solr implementation, the issue was found very quickly.
The Take() was made after GetResults() was called, so the entire data set was returned to Sitecore from Solr, and then the take was applied to get the top 5 results.
This simple mistake caused all the network and performance issues.
It was a simple fix to move the Take before GetResults so instead of the entire data set, Solr returned only the top 5 results to Sitecore and the processing time is reduced.
This is why I believe that you should always Introduce a (Solr) Sitecore Search Abstraction.