Server Error in '/' Application.

There is insufficient system memory in resource pool 'internal' to run this query.
Error: 596, Severity: 21, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.

A severe error occurred on the current command.  The results, if any, should be discarded.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: There is insufficient system memory in resource pool 'internal' to run this query.
Error: 596, Severity: 21, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.

A severe error occurred on the current command.  The results, if any, should be discarded.

Source Error:


Line 30:         SqlDataSource1.SelectCommand = "SELECT dbo.news.id, CONVERT (nvarchar, dbo.news.id) + '/' + REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(dbo.news.title, ':', '-'), '/', '-'), '!', ''), N' ،', '،'), N'؟', ''), N'،', '-'), '?', ''), '.', '-'), ' ', '-'), '--', '-') AS SEO, dbo.news.meta_Tags, dbo.news.date, dbo.news.News_time, dbo.news.Pre_title, dbo.news.title, dbo.news.Short_Desc, dbo.news.Description, LTRIM(RTRIM(dbo.news.PictureFolder)) + dbo.news.PictureURL AS PictureURL, LTRIM(RTRIM(dbo.news.PictureFolder)) + dbo.news.PictureURLBig AS PictureURLbig, dbo.News_Cats.NC_Name, dbo.news.Visit_Counter, (SELECT COUNT(com_id) AS ScoreTedad FROM dbo.News_Comments WHERE (News_id = dbo.news.id)) AS RateCounter, CASE WHEN (SELECT COUNT(com_id) AS ScoreTedad FROM dbo.News_Comments WHERE (News_id = dbo.news.id)) > 0 THEN CAST(5 * CAST((SELECT COUNT(com_id) AS ScoreTedad FROM dbo.News_Comments AS News_Comments_1 WHERE (News_id = dbo.news.id) AND (scoreplus = 'True')) AS decimal(18 , 1)) / (SELECT COUNT(com_id) AS ScoreTedad FROM dbo.News_Comments AS News_Comments_2 WHERE (News_id = dbo.news.id)) AS decimal(18 , 1)) ELSE 0.0 END AS NRate FROM dbo.news INNER JOIN dbo.News_Cats ON dbo.news.NC_id = dbo.News_Cats.NC_id WHERE (dbo.news.id = " & cid & ")"
Line 31:         SqlDataSource1.DataBind()
Line 32:         ddlNewsID.DataBind()
Line 33:         ddlNewsTitle.DataBind()
Line 34:         ddlPre_title.DataBind()

Source File: D:\Hosts\shopcar.ir_Blog\NewsSP.aspx.vb    Line: 32

Stack Trace:


[SqlException (0x80131904): There is insufficient system memory in resource pool 'internal' to run this query.
Error: 596, Severity: 21, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.

A severe error occurred on the current command.  The results, if any, should be discarded.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3335264
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +334
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4679
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +89
   System.Data.SqlClient.SqlDataReader.get_MetaData() +101
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +624
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3392
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +725
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +84
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +312
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +3215
   System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +389
   System.Web.UI.WebControls.ListControl.PerformSelect() +44
   News.Page_Load(Object sender, EventArgs e) in D:\Hosts\shopcar.ir_Blog\NewsSP.aspx.vb:32
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0