Home > Analysis Services, Processing, Trouble Shooting > SSAS – Out of memory exception during processing

SSAS – Out of memory exception during processing

For a while now I been analysing a situation and i have got it down to a fine art now where by I do the following

      1. Create a memory a memory intensive situation where i am using 85% of available memory and SSAS is working hard to free memory.
      2. Process add a dimension and capture statistics.
      3. Review statistics, contemplate the results and then tweak something.
      4. Start at step 1 again.

The other day when i did my process add I was presented with the following error.

The following exception occurred while an operation was being performed on a data source view: The type initializer for ‘System.Xml.Schema.XmlSchemaComplexType’ threw an exception.;Exception of type ‘System.OutOfMemoryException’

    I was not out of memory! Yes i was pushing hard but i still had 20gb availble to SSAS and plenty in the OS and this had never happened in any of my previous iterations!
    As i explored i found that the memory error was only happening when I pushed the server and i spent much time banging my head against the wall trying to get past this problem because i needed to be able to process with the memory pressure present. I backed out my change but still the error persisted.
    After a night of contemplation I realised I had deviated slightly from my normal routine where by this time the tweak I had made required an SSAS restart to take effect and therefore when I ran the process add it was probably the first since server start. I ran the tests again but this time I ran a process add for 20 seconds and then cancelled it before creating memory pressure, this time my tests worked, no memory error! So, SSAS is loading something into memory and because we are under pressure we get a memory error, but what is it?
    Enter process explorer. Below is a snapshot of the dll’s loaded into the SSAS address space immediately after a restart (sorted alphabetically by dll).


Now, i run a process add and highlighted below we can see SSAS loaded SQL Native client!



The SQL Native Client (and related dll’s) are loaded into the SSAS address space the very first time processing runs, in my original tests we had not loaded the client yet when we were under heavy memory pressure and when SSAS tried to load the native client it hit an out of memory resulting in the out of memory errors during processing! 😀

What i saw in our test environment proved to be a very rare situation and i doubt I would ever see it in production. I found troubleshooting this problem very interesting and educational which is why i wanted to share the information and I hope you find this post interesting as well.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: