The BVN-404 Handler, a popular add-on gadget to Epi CMS, was indirectly impacting site performance.
The BVN-404 Handler gadget logs 404 errors and manages redirects. When a 404 occurs, the handler logs it into the BVN.NotFoundRequests table in the CMS database. The CMS admin, using a GUI, can view the 404s and convert them to redirects. The admin also can create redirects directly in the gadget. Redirects are stored in the tblBigTable.
When a site/application has excessive amounts of 404 errors, the BVN.NotFoundRequeststable can grow quite large; over 50K rows for example. The amount of rows negatively impacts site performance because the table is repeatedly scanned with the query:
SELECT COUNT(DISTINCT [OldUrl]) FROM [dbo].[BVN.NotFoundRequests].
To improve performance:
- Disable logging. Edit web.config by locating the following line and changing logging to Off (and if the logging parameter is missing, add it):
<bvn404Handler handlerMode="On" logging="On" fileNotFoundPage="/404notfound.aspx" >
Change it to:
<bvn404Handler handlerMode="On" logging="Off" fileNotFoundPage="/404notfound.aspx" %gt;
- Truncate the BVN.NotFoundRequests table:
TRUNCATE TABLE [BVN.NotFoundRequests]
Disabling logging means that newly occurring 404s are not entered into the table. Unfortunately, 404s are not always treated seriously, and often ignored. Until you take action to reduce 404s, you should leave logging off, otherwise, the table will grow again and impact site performance.