Are too many "Related Products" causing my database to time-out? [SOLVED]

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
About two weeks ago, after getting "Related Products Religion" I started having some database timeout issues primarily in the administrative backend whilst trying to make changes on merchandise with more than 10 or so related products and was wondering if there is a way to disable this functionality in one fell swoop to see if that is indeed the problem. Thanks!

Details:
NopCommerce 1.90
MSSQL 2008
Softsyshosting
Asp.net 4.0 in full trust

The error:

Exception of type 'System.Web.HttpUnhandledException' was thrown.

Exception:

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) --- End of inner exception stack trace --- at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Objects.ObjectContext.CreateFunctionObjectResult[TElement](EntityCommand entityCommand, EntitySet entitySet, EdmType edmType, MergeOption mergeOption) at System.Data.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, MergeOption mergeOption, ObjectParameter[] parameters) at System.Data.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ObjectParameter[] parameters) at 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) at 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) at NopSolutions.NopCommerce.Web.Modules.RelatedProductsControl.BindData() at NopSolutions.NopCommerce.Web.Modules.RelatedProductsControl.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive()
12 years ago
*Bump*

Someone please help with this.

Clicking anywhere other than on an actual product page works reasonably well but when you view any product, it either takes a long time or just times out with the error message.  Our orders have gone down.
12 years ago
Just as I suspected,

DELETE FROM dbo.Nop_RelatedProduct

solved the problem.  Word to the wise, 10,000 interrelated Related Products is a no-no.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.