SSMS 16.3 - An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown. - by Javier Villegas

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


77
0
Sign in
to vote
ID 3074856 Comments
Status Resolved Workarounds
Type Bug Repros 28
Opened 8/22/2016 5:41:41 AM
Access Restriction Public

Description

SSMS 16.3 raises 'System.OutOfMemoryException' just with few open sessions
Sign in to post a comment.
Posted by Flair on 6/7/2017 at 9:31 AM
SSMS still has several memory leaks
Microsoft SQL Server Management Studio                        13.0.15900.1
Microsoft Analysis Services Client Tools                                13.0.1700.281
Microsoft Data Access Components (MDAC)                        6.1.7601.17514
Microsoft MSXML                                                                3.0 6.0
Microsoft Internet Explorer                                                9.11.9600.18665
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.1.7601
Posted by GarageMahal2 on 5/3/2017 at 10:31 AM
Reinstalled latest and greatest and error hit me almost instantly:

Microsoft SQL Server Management Studio                        14.0.17099.0
Microsoft Analysis Services Client Tools                        14.0.513.48
Microsoft Data Access Components (MDAC)                        6.1.7601.17514
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                        9.11.9600.18638
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.1.7601
Posted by Rick_Syncbak on 5/3/2017 at 8:07 AM
Absolutely not resolved.

Still getting this in
Microsoft SQL Server Management Studio    13.0.16106.4
Microsoft Analysis Services Client Tools        13.0.1700.441
Microsoft Data Access Components (MDAC)    10.0.15063.0
Microsoft MSXML                        3.0 5.0 6.0
Microsoft Internet Explorer                9.11.15063.0
Microsoft .NET Framework                4.0.30319.42000
Operating System                        6.3.15063
Posted by GarageMahal2 on 4/6/2017 at 8:40 AM
I have been using the latest RC in hopes that this was fixed but it occurred again today.

Microsoft SQL Server Management Studio                        14.0.17028.0
Microsoft Analysis Services Client Tools                        14.0.338.80
Microsoft Data Access Components (MDAC)                        6.1.7601.17514
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                        9.11.9600.18537
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.1.7601
Posted by GarageMahal2 on 4/3/2017 at 8:50 AM
Also still an issue for me.

Microsoft SQL Server Management Studio                        13.0.16106.4
Microsoft Analysis Services Client Tools                        13.0.1700.441
Microsoft Data Access Components (MDAC)                        6.1.7601.17514
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                        9.11.9600.18537
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.1.7601
Posted by JackInTBox on 2/22/2017 at 12:50 PM
This is still an issue. Out of the blue it stops working.

Microsoft SQL Server Management Studio                        13.0.16106.4
Microsoft Analysis Services Client Tools                        13.0.1700.441
Microsoft Data Access Components (MDAC)                        6.1.7601.17514
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                        9.11.9600.18537
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.1.7601
Posted by Linda Lorentz Fletcher on 11/14/2016 at 12:57 PM
I just installed v16.5 (Oct 2016) and the first and only query I ran was trying to get some maintenance plan history out of msdb. I received the same exception. I would NOT consider this resolved. I have submitted my findings to my TAM, to see if he can forward it to the appropriate team.
Posted by TonyMatthews on 11/10/2016 at 2:44 PM
This looks more and more like a memory leak. If you keep SSMS open, the exceptions get progressively worse until running any queries at all produce this error. If you close SSMS and re-launch everything works OK again for a while.

This never happened in SSMS 2014 - I could run stuff in the same instance for weeks and queries ran perfectly. SSMS 2016 is a definite backward step as things stand.
Posted by TonyMatthews on 11/10/2016 at 2:10 AM
This is not resolved. I am still seeing random out of memory exceptions. This is not repeatable - as it doesn't always happen and it doesn't reliably repeat when you re-run exactly the same query after a failure.

Microsoft SQL Server Management Studio                        13.0.16000.28
Microsoft Analysis Services Client Tools                        13.0.1700.441
Microsoft Data Access Components (MDAC)                        6.3.9600.17415
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                        9.11.9600.18500
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.3.9600
Posted by Drummer0512 on 11/4/2016 at 7:11 AM
I beg to differ on the fact that this is resolved. I am still encountering the error 'An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown.' on small query sets, sometimes even the first run. I am currently running the latest release version of Microsoft SQL Server Management Studio

Microsoft SQL Server Management Studio                        13.0.16000.28
Microsoft Analysis Services Client Tools                        13.0.1700.441
Microsoft Data Access Components (MDAC)                        6.1.7601.17514
Microsoft MSXML                        3.0 4.0 6.0
Microsoft Internet Explorer                        9.11.9600.18499
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.1.7601


I refuse to accept that the data set being returned is at fault, as the result set of the so called "offending query" returns a single row of values, on basic JOINs. I only have two sessions opened locally.
Posted by BlackRobin02 on 10/25/2016 at 4:04 AM
I'm still getting this issue, even when running SELECT TOP 10 * FROM Small_Table

Microsoft SQL Server Management Studio        13.0.15900.1
Microsoft Analysis Services Client Tools        13.0.1700.281
Microsoft Data Access Components (MDAC)    10.0.10586.0
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                    9.11.10586.0
Microsoft .NET Framework                    4.0.30319.42000
Operating System                        6.3.10586
Posted by xyvyx on 10/12/2016 at 8:08 AM
and THIS is why I haven't upgraded other systems. I still have this problem every week or so with SSMS 2012 (11.0.6020.0) and a fix was never and will likely never be released. I'm baffled why Microsoft continues to neglect issues like this... SQL Server is a cornerstone product on which many levels of applications are built.
Posted by Yakovma on 9/28/2016 at 6:40 AM
i agree with PaulPRG that this version is the most buggy version that I can remember.
it's crashed every day,
send this message ''System.OutOfMemoryException' every 3-4 hours.
when i open the file menu, the left panel (with folder tree) is empty.
Microsoft wake up!!!
Posted by DaveKimberley on 9/28/2016 at 4:23 AM
Still getting out of memory errors with 16.4.1, version details:

Microsoft SQL Server Management Studio                        13.0.15900.1
Microsoft Analysis Services Client Tools                        13.0.1700.281
Microsoft Data Access Components (MDAC)                        6.1.7601.17514
Microsoft MSXML                        3.0 6.0
Microsoft Internet Explorer                        9.11.9600.18449
Microsoft .NET Framework                        4.0.30319.42000
Operating System                        6.1.7601
Posted by Nick__H on 9/26/2016 at 3:26 AM
This is still an issue in 16.4 (13.0.15800.18).

An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown.
Posted by PaulPRG on 9/22/2016 at 6:55 AM
I'm running SQL Server 2016 Management Studio    13.0.15700.28 and this by far is the most buggy version that I can remember (20+ years on SQL Server). I don't see this OutOfMemoryException, SSMS just crashes all the time, without warning and sometimes when I've just left it open and I'm using other applications. This is seriously impacting my productivity since I've restarted it now 6 times in the last 2 hours.

This needs attention from Microsoft.
Posted by Stuart R. Ainsworth on 9/21/2016 at 7:02 AM
I just got this again after upgrading to 16.4. Please consider re-opening, or I'll resubmit.
Posted by Christoph Muthmann on 9/14/2016 at 10:44 PM
Hi Javier,
the last release was on the 16th of August. They want to deliver monthly, so I think, we have to wait a few more days. Next week should be possible. I'm waiting, too!
Posted by Javier Villegas on 9/12/2016 at 4:46 PM
Status is FIXED but I still have to use SSMS 2014 because the fix was not released yet. Any ideas on when ??
Posted by SAinCA on 8/31/2016 at 4:31 PM
It is very confusing when the SSMS Installer dialog proudly displays "August 2016", only to find that the actual version is the July Hotfixx rev, and that, once restarted, one of those, "An update...is available" pop-ups shows up!

So at least I have a decent version, despite the installer label being incorrect.
Posted by SAinCA on 8/31/2016 at 4:02 PM
With over 30 registered servers, and many folks will have far more, the frequency of failure is far too high to have to wait for the next release. Surely Microsoft, you wouldn't suggest we de-register our servers, would you, in view of the comment below, "... proportional to the number of registered servers you have..."? I shall not!

HOTFIX hereby requested. Especially as I just attempted to download the older SSMS 2016 version from July and, "Oh look! It's the AUGUST version!" So I am stuck with a broken piece of essential kit. Unacceptable.
Posted by Javier Villegas on 8/29/2016 at 12:46 PM
Is there an ETA for the next release ?
Posted by David [MSFT] on 8/29/2016 at 10:21 AM
turns out there's a thread leak in a utility class. The number of threads leaked will be proportional to the number of registered servers you have, among other things. A fix is coming in the next release
Posted by ADavie70 on 8/25/2016 at 12:29 PM
How many dumps would you like? Not trying to be funny but 10+ a day won't be a problem.

Sometimes closing some of the tabs resolves the problem. But shortly afterwards when trying to open a new query window, SSMS gets "stuck" on the "Connect to Server" panel and the only recourse is to terminate SSMS.
Posted by Charles L Gagnon MSFT on 8/24/2016 at 10:15 AM
We're aware of this issue and are currently working on tracking down the problem. In the meantime you can help by providing us with full memory dumps of SSMS when it crashes. To get this follow these steps:

1. Download ProcDump (https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx)
2. Unzip the download into a folder of your choosing
3. Open a cmd prompt (Ctrl+R, type cmd, hit enter)
4. Run the following command:

<PathToProcDumpFolder>\procdump.exe -e 1 -f System.OutOfMemoryException -ma -w ssms.exe

(It should prompt you to accept a license agreement, click Agree)

5. Start SSMS if not started already
6. Repro issue
7. Text should appear in the cmd prompt about writing the dump file, wait for that to finish
8. Create a new folder and copy the *.dmp file that is written out to that folder
9. Copy the following files into the same folder
    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll"
    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\SOS.dll"
    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
10. Zip up the folder and send me an e-mail, I will provide further instructions for getting it to us.

-Charles Gagnon (chgagnon@microsoft.com)
Posted by Djangojazz2 on 8/24/2016 at 7:29 AM
This same error happens to me too. Windows 10 64 bit Pro OS. It will happen even when I just leave up SSMS with a single session not executing with something as small as 'Select top 10 * from (smallTable)'.
Posted by JimP122 on 8/22/2016 at 7:43 AM
Numerous out of memory exceptions and connection hang issues. From ApplicationLog.xml...

<entry>
    <record>373</record>
    <time>2016/08/22 14:11:57.063</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Threading.Thread.StartInternal(IPrincipal principal, StackCrawlMark& stackMark)
at System.Threading.Thread.Start(StackCrawlMark& stackMark)
at System.Threading.Thread.Start()
at Microsoft.VisualStudio.Package.LanguageService.StartThread()
at Microsoft.VisualStudio.Package.LanguageService.BeginParse(ParseRequest request, ParseResultHandler handler)
at Microsoft.VisualStudio.Package.Source.BeginParse(Int32 line, Int32 idx, TokenInfo info, ParseReason reason, IVsTextView view, ParseResultHandler callback)
at Microsoft.VisualStudio.Package.ViewFilter.GetDataTipText(TextSpan[] aspan, String& textValue)
at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.TryGetQuickInfoFromFilter(IQuickInfoSession session, TextSpan[] dataBufferTextSpan, String& tipText)
at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.AugmentQuickInfoSession(IQuickInfoSession session, IList`1 qiContent, ITrackingSpan& applicableToSpan)
at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate()
at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start()
at Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object sender, MouseHoverEventArgs e)
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()</description>
</entry>
Posted by Javier Villegas on 8/22/2016 at 6:09 AM
With previous SSMS this was happening once in a while. now happens every couple of hours. It's kind of impossible to work. Hope MS recognize the problem and fixes it quickly
Posted by gbw4444 on 8/22/2016 at 6:04 AM
Used to be this was his 32-bit highness SSMS running out of paged pool, but it seems to be more frequent in 16.3