System.OutOfMemoryException occurs frequently after Upgrading SQL Server 2016 to version 13.0.15700.28

I am running Windows 10 Pro 64 bit on a dev box that has multiple monitors, 16 gigs DDR4 RAM, 4 Ghz I7, GTX 970. I run SQL Management Studio with SQL Server 2016 Developer Edition along with VS 2015 Enterprise Update 3.

Yesterday I upgraded Sql Management Studio 2016 to 13.0.15700.28 and it was like a poison pill for my machine. Now after an hour or two it will throw an out of memory except:

  • timestamp and datetime
  • Construct a table using results from 2 queries
  • Can I create a One-Time-Use Function in a Script or Stored Procedure?
  • Select users belonging only to particular departments
  • SQL Server 2012 Integration Services failed when connecting thru SSMS
  • EF 6 - How to correctly perform parallel queries
  • An error occurred while executing batch. Error message is: Exception
    of type ‘System.OutOfMemoryException’ was thrown

    Now this is sometimes typical if you are doing very large return sets of over a few million rows. NOT if you are doing

    Select Top 10 * from SmallObject

    I was doing some new table and procedure creation for new objects to an existing development system. And this just occurs out of the blue for no rhyme or reason. It also appears to be a partial blocking error for SSMS as it now freezes the system and attempts to bring up a connection dialog window like I am first starting SSMS and attempting to connect to a datasource. Thus far it goes to a crawl until I kill it from task manager. I am also running Redgate’s SQL Prompt Things I have tried:

    1. Attempted to keep tabs under five at a time and close them as I am done.
    2. Do not break off the tabs from one screen to another.
    3. Turn off Redgate and see if it is the culprit
    4. Check memory use as I go

    I know it blew up last night as I came into work and SSMS let me know it had crashed. This may be an MS bug but there may be a bug in Redgate or some other config I have so I thought it best to ask SO and see what others have seen. This build of SSMS is as of 8/15/2016 so it is very new.

    Two errors from stack traces of Application Event Logs: Event 1026

    Application: ssms.exe Framework Version: v4.0.30319 Description: The
    process was terminated due to an unhandled exception. Exception Info:

    System.ComponentModel.Win32Exception at
    at System.Windows.Forms.Control.CreateHandle() at
    System.Windows.Forms.ComboBox.CreateHandle() at
    System.Windows.Forms.Control.CreateControl(Boolean) at
    System.Windows.Forms.Control.CreateControl(Boolean) at
    System.Windows.Forms.Control.CreateControl(Boolean) at
    System.Windows.Forms.Control.CreateControl(Boolean) at
    System.Windows.Forms.Control.CreateControl(Boolean) at
    System.Windows.Forms.Control.CreateControl() at
    ByRef) at
    ByRef) at
    ByRef) at
    ByRef) at
    System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)
    ByRef) at
    ByRef) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr,
    Int32, IntPtr, IntPtr)

    The other one was an event log 1002 error ‘Application Hang’ and has no real meaningful help that I can see:

    C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe


    Updated 8-23-2016:

    Still get this error from time to time:

    The program Ssms.exe version 2015.130.15700.28 stopped interacting
    with Windows and was closed. To see if more information about the
    problem is available, check the problem history in the Security and
    Maintenance control panel. Process ID: 35f8 Start Time:
    01d1fca7e48da2da Termination Time: 4294967295 Application Path:
    C:\Program Files (x86)\Microsoft SQL
    Server\130\Tools\Binn\ManagementStudio\Ssms.exe Report Id:
    4e8b6ab9-693f-11e6-a2cb-f832e4a07fda Faulting package full name:
    Faulting package-relative application ID:

    Clearly this is an issue for people other than me as I am getting votes on it here:

    If you have this happen to you or know a potential fix, please let me know. At this point if I have to do heavy SQL work coming up I am thinking of downgrading at this point. Again I am on Windows 10 64 bit machine and this only happened after upgrading to the most recent SSMS build.

    Update 8-24-2016

    MS appears to acknowledge this bug now. If you have this happen to you PLEASE go to this link and upvote:

    Update 8-31-2016

    Latest from MS on exception:

    Posted by Microsoft 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

    I downgraded as doing work got more important than figuring out what was blowing up. Downgrade for me is working fine now. I gave MS SQL dumps so hopefully they can get a new build in the coming weeks. If you are curious I am on version 13.0.15600.2 and stable thus far as I downgraded two days ago.

  • Semantic Search without using filetable in sql server 2012
  • Find out whether a value is already present in the table or not
  • how to sum the time grouped by individual day in Sql-server
  • How to add a record to a table using parameters from differents View in ASP MVC and SQL
  • Why do I get “Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.” when I try to use sp_executesql?
  • SQL statement, nested in query with two keys
  • 2 Solutions collect form web for “System.OutOfMemoryException occurs frequently after Upgrading SQL Server 2016 to version 13.0.15700.28”

    Seems like they fixed the issue with the latest release: SSMS 16.4.1

    5. Fixed an issue where an Out Of Memory Exceptions were being thrown.(Microsoft Connect item #3062914)(Microsoft Connect item #3074856)

    I had the same problem. I just close and reopen the SQL Server. was able to over come the error.

    An error occurred while executing batch. Error message is: 
    Exception of type 'System.OutOfMemoryException' was thrown.
    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.