If you run MS Reporting Services 2000 you may find that when running large reports you get one of the following messages:
"A general error occurred"
"An internal error occurred" - rsInternalError
When you check the SQL Server logs you'll see that an out of memory execption was thrown. normally with a "Error: 17803, Severity: 20, State: 12"
Now on our server we still had plenty of physical memory left, especially after applying the exchange fix below. But this error still happens, so why? or rather "how the heck do I fix this so users can access that report again?"
Continue after the break for the solution
Solution
SQL server 2000 will only address 2GB of RAM, and it does this in some strange ways. i.e.
physical ram - 256MB = size of non user reserved space for preloading (Bpool)
2Gb address space - Bpool size = size available for queries.
Lets look at this for a server with 2GB physical RAM.
2GB-256MB = 1.75GB
2GB address space - 1.75GB = 256MB query space.
And for a server with 1Gb of RAM this out of memory problem wont happen because:
1GB-256MB = 750MB
2GB address space - 750MB = 1.25GB of query address space!
In the long run if you happen to have a server with 2GB physical RAM then you are left with only 256MB of address space for handling a query. Bizzarly a server with 1GB of RAM wont suffer from this problem. However you can add a switch to the start up parameters that allocates a bigger address space for these queries.
- Open your SQL server manager
- Right click on the SQL server in question and choose properties
- Click on the Startup Parameters button
- Insert a new parameter "-g512" (which is 512MB, you can set it to be less, but not more than this value)
2GB-512MB = 1.5GB
2GB address space - 1.5GB = 512MB of query address space! which is double the default.
- Buy the Enterprise edition of SQL server which lets you set the limit higher than 512
- Reduce the size of the data your datasets are returning. Which is probably best anyway.
No comments:
Post a Comment