Unhandled Exception: System.OutOfMemoryException
PDinCA
Posts: 642 Silver 1
If a script happens to cause SSMS (2014) to hiccup with the above exception, when clicking a Database in the Object Explorer, SSC3 (latest build), doesn't hiccup, it becomes a 6-feet-under terminal case.
Here's the section of the log:
Here's the section of the log:
12:01:42.170|Warn |#rlhb.#2Ec |34 |Transition from unknown to known detected, previously known as SOC-2819 12:01:48.033|Warn |les.CancellableUtils|12 |Exception occurred in Registering working base RedGate.SQLSourceControl.Engine.Model.Comparison.TwoWay.SqlCompareException: Exception of type 'System.OutOfMemoryException' was thrown. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at RedGate.SQLCompare.ASTParser.StructureParser.fromJoin() at RedGate.SQLCompare.ASTParser.StructureParser.tableSource() at RedGate.SQLCompare.ASTParser.StructureParser.tableSourceList() at RedGate.SQLCompare.ASTParser.StructureParser.fromPart() at RedGate.SQLCompare.ASTParser.StructureParser.simpleSelectExpression() at RedGate.SQLCompare.ASTParser.StructureParser.subSelectExpression() at RedGate.SQLCompare.ASTParser.StructureParser.selectExpression() at RedGate.SQLCompare.ASTParser.StructureParser.selectStatement() at RedGate.SQLCompare.ASTParser.StructureParser.isInSubclause() at RedGate.SQLCompare.ASTParser.StructureParser.notSubclause() at RedGate.SQLCompare.ASTParser.StructureParser.notSubclause() at RedGate.SQLCompare.ASTParser.StructureParser.andSubclause() at RedGate.SQLCompare.ASTParser.StructureParser.orSubclause() at RedGate.SQLCompare.ASTParser.StructureParser.searchSubclause() at RedGate.SQLCompare.ASTParser.StructureParser.searchCondition() at RedGate.SQLCompare.ASTParser.StructureParser.ifStatement() at RedGate.SQLCompare.ASTParser.StructureParser.coflStatement() at RedGate.SQLCompare.ASTParser.StructureParser.statementWithoutEnds() at RedGate.SQLCompare.ASTParser.StructureParser.beginStatementBlock() at RedGate.SQLCompare.ASTParser.StructureParser.beginStatement() at RedGate.SQLCompare.ASTParser.StructureParser.coflStatement() at RedGate.SQLCompare.ASTParser.StructureParser.statement() at RedGate.SQLCompare.ASTParser.StructureParser.whileStatement() at RedGate.SQLCompare.ASTParser.StructureParser.coflStatement() at RedGate.SQLCompare.ASTParser.StructureParser.statement() at RedGate.SQLCompare.ASTParser.StructureParser.createProcedureStatements() at RedGate.SQLCompare.ASTParser.StructureParser.createProcedureStatement() at RedGate.SQLCompare.ASTParser.StructureParser.createStatement() at RedGate.SQLCompare.ASTParser.StructureParser.statementFirstInBatch() at RedGate.SQLCompare.ASTParser.StructureParser.statementBatch() at RedGate.SQLCompare.ASTParser.StructureParser.expr() at RedGate.SQLCompare.Engine.Database.GetDependencies(String sql, Boolean quotedIdentifiers, Boolean throwExceptions) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#HIh(Element #iAPb, Boolean #AXrc, String& #K9Zb, Int32& #O1rc) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#GIh(Element #wpUb) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#SHh(AST #iAPb) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#SHh(AST #iAPb) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.VisitNode(Element node, AnalysisProvider`1 provider) at RedGate.SQLCompare.Rewriter.Analysis.Analyser`1.#hbh(Element #fpl) at RedGate.SQLCompare.Rewriter.Analysis.Analyser`1.Analyse(IEnumerable`1 elements) at #Eyg.#Gyg.#CGh(FileInfo #mDk, #ZiP #x2Od) at #Eyg.#Gyg.Populate(IEnumerable`1 #rXrc) at RedGate.SQLCompare.Engine.Database.Register(String path, ScriptDatabaseInformation dbinfo, Options options, IEnumerable`1 filesToUse, IReadFromFolderCache cache) at #NsZc.#y0Lc.#lI4d(DirectoryInfo #yIc, ICompareScriptDatabaseInformation #P53c, ICompareOptions #5OPb, Boolean #jf4c, IReadFromFolderCache #EPWb) at #NsZc.#y0Lc.#PsZc(DirectoryInfo #yIc, ICompareScriptDatabaseInformation #P53c, ICompareOptions #5OPb, Boolean #jf4c) at RedGate.SQLSourceControl.Engine.Diff.CompareEngineUtils.WrapRegisterWithCache(ICompareDatabase db, String path, ICompareScriptDatabaseInformation scriptFolderOptions, ICompareOptions options, Boolean isDatabaseCaseSensitive) at #R9Jd.#Z4Jd.#hSJd(String #nIc, ICompareDatabase #Z3c, ICompareScriptDatabaseInformation #Y4Jd) at #R9Jd.#Z4Jd.#v3.#MRJd() at #NsZc.#MsZc.#gKf(Action #sxPb) --- End of inner exception stack trace --- Server stack trace: at #NsZc.#MsZc.#gKf(Action #sxPb) at #R9Jd.#Z4Jd.#Jfb.#Rz1d() at RedGate.SQLSourceControl.Engine.SharedUtilsUtils.DoActionWithCancel(ICancellableOperationStatus status, ICancellable cancellable, Action action) at #R9Jd.#Z4Jd.#f6c(String #nIc, ICompareScriptDatabaseInformation #Y4Jd) at #R9Jd.#Z4Jd.#eSJd(IWorkspaces #RZJd, ICompareScriptDatabaseInformation #Y4Jd) at #R9Jd.#Z4Jd.#A2.#6K5b() at RedGate.SQLSourceControl.Engine.Cancellables.CancellableUtils.<>c__DisplayClass3.<DoInParallel>b__0() at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData) at System.Action.EndInvoke(IAsyncResult result) at RedGate.SQLSourceControl.Engine.Cancellables.CancellableUtils.DoInParallel(ICancellableOperationStatus status, Pair`2[] labelledActions) 12:01:48.081|Error |tabasePollingManager|39 |Exception thrown during action without poller RedGate.Shared.Utils.OperationCancelledException: Exception of type 'RedGate.Shared.Utils.OperationCancelledException' was thrown. at #8rg.#Ssg.#Z5ob() at #8rg.#Ssg.#Xlh(Boolean #8Xrc) at #8rg.#Ssg.Populate(DBPopulationOptions #WXrc) at RedGate.SQLCompare.Engine.Database.Register(ConnectionProperties connectionProperties, Options options, IDmvModelFactory factory) at #NsZc.#y0Lc.#OsZc(IDatabaseConnection #SHc, ICompareOptions #5OPb) at #R9Jd.#Z4Jd.#OsZc() at #NsZc.#MsZc.#gKf(Action #sxPb) at #R9Jd.#Z4Jd.#Iz1d() at RedGate.SQLSourceControl.Engine.SharedUtilsUtils.DoActionWithCancel(ICancellableOperationStatus status, ICancellable cancellable, Action action) at #R9Jd.#Z4Jd.#gSJd() at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.DatabasePollingManager.#y2.#yw0c() at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.DatabasePollingManager.RunWithoutBackgroundPolling[T](Func`1 func) 12:01:48.300|Warn |les.CancellableUtils|12 |Exceptions occurred in two parallel operations Registering working base and Registering most recent version from source control RedGate.SQLSourceControl.Engine.Model.Comparison.TwoWay.SqlCompareException: Exception of type 'System.OutOfMemoryException' was thrown. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Diagnostics.StackTrace.CaptureStackTrace(Int32 iSkip, Boolean fNeedFileInfo, Thread targetThread, Exception e) at System.Diagnostics.StackTrace..ctor(Exception e) at #m.#MUA.#fk(Exception #wJrc, Object[] #L6Xb) at RedGate.SQLCompare.ASTParser.StructureParser.statementBatch() at RedGate.SQLCompare.ASTParser.StructureParser.expr() at RedGate.SQLCompare.Engine.Database.GetDependencies(String sql, Boolean quotedIdentifiers, Boolean throwExceptions) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#HIh(Element #iAPb, Boolean #AXrc, String& #K9Zb, Int32& #O1rc) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#GIh(Element #wpUb) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#SHh(AST #iAPb) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.#SHh(AST #iAPb) at RedGate.SQLCompare.Engine.ReadFromFolder.ReadScriptAnalysis.VisitNode(Element node, AnalysisProvider`1 provider) at RedGate.SQLCompare.Rewriter.Analysis.Analyser`1.#hbh(Element #fpl) at RedGate.SQLCompare.Rewriter.Analysis.Analyser`1.Analyse(IEnumerable`1 elements) at #Eyg.#Gyg.#CGh(FileInfo #mDk, #ZiP #x2Od) at #Eyg.#Gyg.Populate(IEnumerable`1 #rXrc) at RedGate.SQLCompare.Engine.Database.Register(String path, ScriptDatabaseInformation dbinfo, Options options, IEnumerable`1 filesToUse, IReadFromFolderCache cache) at #NsZc.#y0Lc.#lI4d(DirectoryInfo #yIc, ICompareScriptDatabaseInformation #P53c, ICompareOptions #5OPb, Boolean #jf4c, IReadFromFolderCache #EPWb) at #NsZc.#y0Lc.#PsZc(DirectoryInfo #yIc, ICompareScriptDatabaseInformation #P53c, ICompareOptions #5OPb, Boolean #jf4c) at RedGate.SQLSourceControl.Engine.Diff.CompareEngineUtils.WrapRegisterWithCache(ICompareDatabase db, String path, ICompareScriptDatabaseInformation scriptFolderOptions, ICompareOptions options, Boolean isDatabaseCaseSensitive) at #R9Jd.#Z4Jd.#hSJd(String #nIc, ICompareDatabase #Z3c, ICompareScriptDatabaseInformation #Y4Jd) at #R9Jd.#Z4Jd.#v3.#MRJd() at #NsZc.#MsZc.#gKf(Action #sxPb) --- End of inner exception stack trace --- Server stack trace: at #NsZc.#MsZc.#gKf(Action #sxPb) at #R9Jd.#Z4Jd.#Jfb.#Rz1d() at RedGate.SQLSourceControl.Engine.SharedUtilsUtils.DoActionWithCancel(ICancellableOperationStatus status, ICancellable cancellable, Action action) at #R9Jd.#Z4Jd.#f6c(String #nIc, ICompareScriptDatabaseInformation #Y4Jd) at #R9Jd.#04Jd.#DRJd(IWorkspaces #RZJd, ICompareScriptDatabaseInformation #Y4Jd) at #R9Jd.#04Jd.#8PJd(IWorkspaces #RZJd, ICompareScriptDatabaseInformation #Y4Jd) at #R9Jd.#04Jd.#u3.#5K5b() at RedGate.SQLSourceControl.Engine.Cancellables.CancellableUtils.<>c__DisplayClass3.<DoInParallel>b__0() at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData) at System.Action.EndInvoke(IAsyncResult result) at RedGate.SQLSourceControl.Engine.Cancellables.CancellableUtils.DoInParallel(ICancellableOperationStatus status, Pair`2[] labelledActions) 12:01:49.523|Warn |ngWrapper.LogManager|24 |Unhandled Exception: Exception of type 'System.OutOfMemoryException' was thrown.. IsTerminating : True System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at RedGate.SQLSourceControl.Engine.Logging.Event.WriteOutLines() at RedGate.SQLSourceControl.Engine.Logging.Event.<FlushIfInterestingAfter>b__0(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 12:02:26.991|Warn |ngWrapper.LogManager|35 |Unhandled Exception: Exception of type 'System.OutOfMemoryException' was thrown.. IsTerminating : True System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. 12:02:27.019|Warn |ngWrapper.LogManager|32 |Unhandled Exception: Exception of type 'System.OutOfMemoryException' was thrown.. IsTerminating : True System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. 12:02:29.381|Warn |ngWrapper.LogManager|52 |Unhandled Exception: Exception of type 'System.OutOfMemoryException' was thrown.. IsTerminating : True System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. 12:02:30.054|Warn |arsers.IServerParser|7 |We failed to update new entries for the blue blobs, will try again on next poll. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Data.SqlClient.TdsParserStateObject.SetPacketSize(Int32 size) at System.Data.SqlClient.TdsParser.TryProcessEnvChange(Int32 tokenLength, TdsParserStateObject stateObj, SqlEnvChange[]& sqlEnvChange) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.SOCSqlConnection.Open() at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.TempDbSqlConnectionProvider.OpenSqlConnection() at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.DecoratedTempDbSqlConnectionProvider.OpenSqlConnection() at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.ServerParsers.DefaultTraceParser.#gJUc(ICollection`1 #PfBb, SqlDateTime #yQ3c, Boolean #xEOd) at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.ServerParsers.DefaultTraceParser.#Emb(ICollection`1 #PfBb, SqlDateTime #yQ3c, Boolean #xEOd) at RedGate.SQLSourceControl.Engine.DatabasePolling.DatabasePolling.ServerParsers.DefaultTraceParser.GetNewEntries(ICollection`1 databaseNames) 12:02:30.289|Warn |ngWrapper.LogManager|10 |Unhandled Exception: Exception of type 'System.OutOfMemoryException' was thrown.. IsTerminating : True System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at RedGate.Shared.Utils.Threading.ReliableTimer.OnTick(EventArgs e) at RedGate.Shared.Utils.Threading.ReliableTimer.#Efg() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 12:02:30.766|Warn |ngWrapper.LogManager|15 |Unhandled Exception: Exception of type 'System.OutOfMemoryException' was thrown.. IsTerminating : True System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Threading.OverlappedDataCache.CacheOverlappedData(OverlappedData data) at System.Threading.Overlapped.Free(NativeOverlapped* nativeOverlappedPtr) at System.Net.SafeNativeOverlapped.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalDispose() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Net.Sockets.OverlappedCache.InternalFree() at System.Net.Sockets.OverlappedCache.InterlockedFree(OverlappedCache& overlappedCache) at System.Net.Sockets.Socket.Dispose(Boolean disposing) at System.Net.Sockets.Socket.Dispose() at System.Net.Sockets.Socket.Close(Int32 timeout) at System.Net.Sockets.NetworkStream.Dispose(Boolean disposing) at System.Net.TlsStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.Net.Sockets.NetworkStream.Close(Int32 timeout) at System.Net.Connection.AbortSocket(Boolean isAbortState) at System.Net.Connection.CloseOnIdle() at System.Net.ConnectionGroup.DisableKeepAliveOnConnections() at System.Net.ServicePoint.ReleaseAllConnectionGroups() at System.Net.ServicePointManager.IdleServicePointTimeoutCallback(Timer timer, Int32 timeNoticed, Object context) at System.Net.TimerThread.TimerNode.Fire() at System.Net.TimerThread.TimerQueue.Fire(Int32& nextExpiration) at System.Net.TimerThread.ThreadProc() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...
Decide wisely...
Comments
Thanks for posting your inquiry.
I have created a ticket for this situation, and would like to troubleshoot the situation further with you offline.
Thanks for your time, and I will contact you through the ticket.
Rick
Technical Support
Red Gate Software Ltd.
Thanks for the follow-up.
Stephen
Decide wisely...