Interesting error today:
Recently on one of out performance test environment, we ran into an interesting error that looked new (unfamiliar) and a bit perplexing. Below is the error:
Error: 7886, Severity: 20, State: 1
A read operation on a large object failed while sending data to the client.
A common cause for this is if the application is running in READ UNCOMMITTED isolation level.
This connection will be terminated.
When this error occurred?
Upon further digging (and rereading the error message a few times), it became clear that were performing some long-running NOLOCK query, which was not uncommon in this environment. As it turns out, this is retrieving some large objects and sending to client applications. But in our situation, both of them are not the root of the problem.
What could be the problem?
Since these kind of operations are not uncommon in this environment, it could not have been these operations that could have caused it. May be they contributed, but they did not seem to be the root cause. We ran the same operations several times, sometimes they throw this error and other times it runs fine. So, the problem is some where else.
Solution
Luckily, someone already talked about this error in detail here. It turns out, this particular database, before every performance test, is being rest to ‘AutoGrowth’ with small increments (a.k.a. ~ 1 MB). Once we corrected out preparatory steps (for performance test) to configure the database size properly, this error got resolved.
What the root cause?
As of now, it is not clear as to why this issue occurs, but this is my working theory. When a large read operations (reading LOB and sending to client) occur with NOLOCK isolation, it reads dirty data. It might be possible that, someone else is attempting to change the this LOB at the same time. This by itself would not be a problem, since NOLOCK allows reading uncommitted data; But might be a contributor.
Adding to that, there is not enough free space left in the data file to accommodate the new changes coming in. If its a larger LOB, with size greater than the ‘AutoGrowth’ setting of 1 MB, it might have caused some problem where Sql Server has to take a breather to expand the file properly before allowing changes to occur properly. So the best option is to stop the NOLOCK read connection, which is the least important or light weight task. Doing this would cause least negative impact to the database integrity, while keeping the cost minimal (connection close).
Not sure if this theory is correct, but just a made up theory.
Hope this helps,
_Sqltimes
Read Full Post »