Sql-server – Microsoft SQL Server 2012 Mirrors Go Into Disconnected

buffer-poolmirroringsql-server-2012

I have some Microsoft SQL server 2012 mirrors, without a witness in asynchronous mode, that are sporadically going into disconnected. I am running SQL Server 2012 11.0.5058. Looking at the logs on the mirror side I see

Failed to allocate BUFs: FAIL_BUFFER_ALLOCATION 1

There is a whole bunch of memoryclerk messages

Error: 802, Severity:17, state: 0.

There is insufficient memory available in the buffer pool.

Error:1454, Severity: 16, State: 1.

Database mirroring will be suspended. Server instance 'instance' encountered error 802, state 0, severity 17 when it was acting as a mirroring partner for database 'database'. The database mirroring partners might try to recover automatically from the error and resume the mirroring session. For more information, view the error log for additional error messages.

Any help as to what to check to find out why the mirrors go into suspended and then disconnected following this chain of events would be appreciated. I can reestablish the mirrors after this and they work just fine for a couple of days and then it happens all over again.

Best Answer

I experienced very similar issue in my previous company. Database miroring was periodically getting suspended with the same error as you are getting. Mirroring never ever reconnected on its own, but usually I was able to resume it using:

ALTER DATABASE <Database Name> SET PARTNER RESUME

After a few weeks we figured out that even though there was enought memory on the server and enough memory was allocated to the instance our workload was very unevenly distributed and sometimes 100% of the memory was used. Since most of the time we had enough memory we were not authorised to purchase more. I ended up increasing buffer pool extension file and placing it on one of the SSDs which happened to have enough empty space to accommodate it. The problem with mirroring never returned again. I cannot guarantee that the same will work for you, I am mainly sharing my experience.