Pages

Tuesday 21 August 2012

Error: 30087, Severity: 17, State: 5

I noticed this error in the log of one of my servers that hosts around 100 databases and heavily uses Full text indexes.
the error messages says :

Error: 30087, Severity: 17, State: 5.
2012-08-20 16:24:24.60 spid40s Data coming back to the SQL Server process from the filter daemon host is corrupted. This may be caused by a bad filter. The batch for the indexing operation will automatically be retried using a smaller batch size.


I also noticed a couple of dump files which appeared to be related to the above error message. I googled a bit, but did not find anything useful then opened the dump file and started looking for clues.

This is an extract from th edump.

The highlighted text in the log, reads;

IFTS Encountered memory pressure. decreasing the batch size, number of simultaneous crawlers and/ or ISM size can help alleviate the problem. Global\ISM

This was a sign that the full text deamon was consuming too much memory running out of memory.
The server has 12 CPUs and plenty of memory, but the max server memory was set at default which meant that Sql server was taking all the memory.

To resolve the issue, I performed the following;

- Set a limit to Max server memory that sql server can use, this will give the full text deamon and other services running on the server to have a share of the memory.

Finding the correct value for Max server memory is different for each server and depends on many factors including what else is running on the box along side sql server. The following article gives a formula to calculate the amount of memory that is needed for fdhost.exe

Performance Tuning and Optimization of Full-Text Indexes

The second thing I did was to set the Max full-text crawl range, this is a configuration option that optimises CPU utilisation when performing a full crawl.

The optimum value for  Max full-text crawl range is the number of CPUs on the server, in my case I have 2 sockets with 6 core each

sp_configure 'max full-text crawl range', 12
Reconfigure

The third thing you should do is reorganise and compact the FT indexes using
ALTER FULLTEXT CATALOG [CatalogName] REORGANIZE;

No comments: