Thursday, August 25, 2011

HTTP 500 Error with Large Reports in SCCM 2007

If you have more than a couple thousand clients in your SCCM 2007 site and have ever tried to run a large report (like “Hardware 01A – Summary of computers in a specific collection” against the All Systems collection, for example), you’ve probably encountered this HTTP 500 error:
image
This problem and resolution are pretty well documented for Windows Server 2003 and IIS6, but in this particular case we’re running Windows Server 2008 SP2, so we’re using IIS7.  The underlying cause is the same (default ASP Buffering Limit is set too low to handle the size of the report) and the fix is the same (increase the limit), but the steps to fix are just a little different for IIS7:


1. Launch IIS Manager
2. Click on the server name in the left pane to bring up the features for IIS (if you have more than just the SCCM reporting hosted in IIS and don’t want to modify this setting for all sites, expand the Sites node and click Default Web Site to bring up the features for just that site)
3. Double-click on the ASP feature
image
4. Expand the Limits Properties node and find the Response Buffering Limit item.
image
By default it’s set at about 4MB (4194304 bytes).  The general rule of thumb is about 1MB per 1000 records, but you may want to go with 1.5 to 2 MB just to be safe.  Modify the value and click Apply in the actions pane.
5. Restart IIS.
Now when you run your report you should actually get the results!
image
As you can see, in this case we had around 4500 records, which was just enough to fill the response buffer and generate the error.  Bumping it up to 10k bytes to accommodate future growth was more than enough to resolve the issue.