The query has been canceled because the estimated cost of this query (546478) exceeds the configured threshold of 2500. Contact the system administrat

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I have a website hosted by Winhost, and after a year or so I started to get the following error. Any suggestions on how to resolve it?

The query has been canceled because the estimated cost of this query (546478) exceeds the configured threshold of 2500. Contact the system administrator.
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: The query has been canceled because the estimated cost of this query (546478) exceeds the configured threshold of 2500. Contact the system administrator.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[SqlException (0x80131904): The query has been canceled because the estimated cost of this query (546478) exceeds the configured threshold of 2500. Contact the system administrator.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2062078
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5050204
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +86
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +443

[EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.]
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +479
   System.Data.Objects.ObjectContext.CreateFunctionObjectResult(EntityCommand entityCommand, EntitySet entitySet, EdmType edmType, MergeOption mergeOption) +182
   System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, MergeOption mergeOption, ObjectParameter[] parameters) +218
   System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, ObjectParameter[] parameters) +53
   NopSolutions.NopCommerce.BusinessLogic.Data.NopObjectContext.Sp_ProductLoadAllPaged(Nullable`1 categoryID, Nullable`1 manufacturerID, Nullable`1 productTagID, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Nullable`1 relatedToProductID, String keywords, Nullable`1 searchDescriptions, Nullable`1 showHidden, Nullable`1 pageIndex, Nullable`1 pageSize, String filteredSpecs, Nullable`1 languageID, Nullable`1 orderBy, ObjectParameter totalRecords) +3395
   NopSolutions.NopCommerce.BusinessLogic.Products.ProductService.GetAllProducts(Int32 categoryId, Int32 manufacturerId, Int32 productTagId, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 relatedToProductId, String keywords, Boolean searchDescriptions, Int32 pageSize, Int32 pageIndex, List`1 filteredSpecs, Int32 languageId, ProductSortingEnum orderBy, Int32& totalRecords) +1048
   NopSolutions.NopCommerce.BusinessLogic.Products.ProductService.GetAllProducts(Int32 categoryId, Int32 manufacturerId, Int32 productTagId, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, String keywords, Boolean searchDescriptions, Int32 pageSize, Int32 pageIndex, List`1 filteredSpecs, Int32 languageId, ProductSortingEnum orderBy, Int32& totalRecords) +140
   NopSolutions.NopCommerce.BusinessLogic.Products.ProductService.GetAllProducts(Int32 categoryId, Int32 manufacturerId, Int32 productTagId, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, String keywords, Boolean searchDescriptions, Int32 pageSize, Int32 pageIndex, List`1 filteredSpecs, ProductSortingEnum orderBy, Int32& totalRecords) +183
   NopSolutions.NopCommerce.BusinessLogic.Products.ProductService.GetAllProducts(Int32 categoryId, Int32 manufacturerId, Int32 productTagId, Nullable`1 featuredProducts, Int32 pageSize, Int32 pageIndex, Int32& totalRecords) +226
   NopSolutions.NopCommerce.BusinessLogic.Manufacturers.Manufacturer.get_FeaturedProducts() +126
   NopSolutions.NopCommerce.Web.Templates.Manufacturers.ProductsInGrid.BindData() +316
   NopSolutions.NopCommerce.Web.Templates.Manufacturers.ProductsInGrid.Page_Load(Object sender, EventArgs e) +93
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
12 years ago
This is an SQL Query Governor limit that has been set, probably by the hosting company.
You can try to change it for your database using this information (http://msdn.microsoft.com/en-us/library/Aa259195), but you might not have access to that function.

You have to get in touch with support of your hosting provider for this. They will probably say that you need to optimize your application. If you have more users that have this problem (check their forum?) then you can ask them to rise the limit for this Governor limit.
12 years ago
Thanks you inkXperts, I'll have a look in their forum, I don't have access via SQL to change the values.
12 years ago
These also helped me :

https://www.nopcommerce.com/boards/t/9831/nop_productloadallpaged-needs-to-be-rewritenoptimized.aspx#46728

and


https://www.nopcommerce.com/boards/t/7958/my-sql-error.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.