When executing large SMS report queries with thousands of rows from an SMS reporting server running on Windows Server 2003 with IIS 6.0, a HTTP 500 error may be returned. This post describes the ASP buffer overflow error that can occur and how to resolve the issue.
After turning off friendly errors, what is actually being returned is an ASP 0251 buffer overflow error, because the response buffer is not large enough. This is due to the default ASP response buffer set using the AspBufferingLimit property in the metabase, configurable at several locations throughout the metabase (see the 'AspBufferingLimit Metabase Property in IIS 6.0' reference below for more information).
Use the standard Windows adsutil.vbs VBScript to read/modify the w3svc/aspbufferinglimit. The default size returned in 2003 Server RTM is 4194304 bytes (4MB), resulting in buffer overflow errors when large queries are executed with thousands of records.
When I've seen this problem, changing the value to 8388608 (8MB) resolved the issues with queries that were found returning this error.
SMS Related article on the problem:
AspBufferingLimit Metabase Property in IIS 6.0:
ASP IIS Errors:
Tuning ASP Metabase Settings:
Wayne's World of IT (WWoIT), Copyright 2008 Wayne Martin.