Developer forum

Forum » Ecommerce - Standard features » Delete shop fails

Delete shop fails

Anders Ebdrup
Anders Ebdrup
Reply

Dear Dynamicweb,

 

When trying to delete a shop with a lot of products the solution fails with this error message:

Server Error in '/' Application.


The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.

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 incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.

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 incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3317868
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +736
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4061
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +90
   System.Data.SqlClient.SqlDataReader.get_MetaData() +99
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +604
   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) +3303
   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) +667
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +83
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +301
   Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior) +557
   Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout) +109
   Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout) +188
   Dynamicweb.Ecommerce.Products.ProductRepository.GetProductsBySql(CommandBuilder query, Boolean doRefactoring, Boolean bulkFill, Boolean useAssortments) +121
   Dynamicweb.Ecommerce.Products.ProductRepository.GetByIds(IEnumerable`1 productIds) +176
   Dynamicweb.Ecommerce.Products.ProductService.DeleteAll(IEnumerable`1 ids, Boolean doRun) +351
   Dynamicweb.Ecommerce.Products.ProductDeleting.DeleteProducts(ProductCollection products) +134
   Dynamicweb.Ecommerce.Products.GroupDeleting.Run(String groupId) +1345
   Dynamicweb.Ecommerce.Shops.ShopService.DeleteShopRelations(Shop shop) +122
   Dynamicweb.Ecommerce.Shops.ShopService.Delete(String shopId) +208
   Dynamicweb.Admin.eComBackend.EcomShopEdit.DeleteButton_Click(Object sender, EventArgs e) in E:\Agent\_work\174\s\01 - Applications\Dynamicweb.Admin\DW910\Dynamicweb.Admin\Admin\Module\eCom_Catalog\dw7\edit\EcomShop_Edit.aspx.vb:629
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11762840
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5028

Replies

 
Tomas Gomez
Reply

Hi,

We have same issue when displaying a customized text page with the data of thousands of products. 

The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.

2021-08-26 09:49:02.902: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
System.Data.SqlClient.SqlException (0x80131904): The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()

 

The issue appeared when updating to DW 9.10.13 from DW 9.9.6.

Does anybody know how to solve this issue?

Regards,
Tomas

 

 
Nicolai Pedersen
Reply

Can you share the entire strack trace?

looks like an entry from eventviewer - there is a logfile that should contain all of it.

Thanks

 
Tomas Gomez
Reply

Here it is:

2021-08-26 09:49:02.902: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
System.Data.SqlClient.SqlException (0x80131904): The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at 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)
at 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)
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 Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)
at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)
at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
at Dynamicweb.Ecommerce.ProductCategoryFieldValueRepository.GetValuesByProductIds(IEnumerable`1 productIds, String defaultLanguageId)
at Dynamicweb.Ecommerce.Products.Categories.ProductCategoryFieldValueService.FetchMissingValuesInternal(ProductCategoryFieldValueRepository repository, IEnumerable`1 keys, Boolean resetFieldLookup)
at Dynamicweb.Caching.ServiceCache`2.GetCache(IEnumerable`1 keys)
at Dynamicweb.Ecommerce.Frontend.Renderer.RenderProductCategories(Product product, Template template, String loopName, Lazy`1 categoryFieldSortings, RenderingContext renderingContext)
at Dynamicweb.Ecommerce.Frontend.Renderer.RenderProduct(Product product, Boolean extendedProperties, Template template, Int32 loopCounter, Boolean renderRelated, String productUrl, Int32 quantity, Int32 wishListId, Boolean renderPublicList, Boolean isRecursiveCall, Lazy`1 categoryFieldSorting, Int32 orderLineOfProductCount, RenderingContext renderingContext, String unitId)
at Dynamicweb.Ecommerce.Frontend.Renderer.RenderProducts(ProductCollection products, Template parentTemplate, String loopName, Int32 loopCounter, Boolean renderRelatedProducts, Boolean renderRelatedLists, Boolean isRecursive, RenderingContext renderingContext)
at Dynamicweb.Ecommerce.Frontend.Renderer.RenderProductsWithContext(ProductCollection products, Template parentTemplate, RenderingContext renderingContext)
at Dynamicweb.Ecommerce.Frontend.Renderer.RenderProducts(ProductCollection products)
at Dynamicweb.Ecommerce.Frontend.Frontend.ListProducts(ProductCollection products, String groupsIdent, Boolean hasBeenSorted)
at Dynamicweb.Ecommerce.Frontend.Frontend.GetProductsFromIndexQuery(ProductCatalogShowType settingsType)
at Dynamicweb.Ecommerce.Frontend.Frontend.EcomRender()
at Dynamicweb.Ecommerce.Frontend.Frontend.GetContent()
at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Dynamicweb.Frontend.Renderer.RenderParagraph(Template template, ParagraphViewModel paragraphViewModel)
at Dynamicweb.Frontend.Content.RenderParagraph(Paragraph paragraph, ContainerInfo containerInfo, Layout layout)
at Dynamicweb.Frontend.Content.CreateContent(IList`1 paragraphs)
at Dynamicweb.Frontend.Content.CreateContent(Int32 contentId)
at Dynamicweb.Frontend.ContentViewModelFactory.CreatePageViewModel(PageView pageView)
at Dynamicweb.Frontend.PageView.SetPageTemplateValues()
at Dynamicweb.Frontend.PageView.Output()
at Dynamicweb.AspNet.DynamicwebHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ClientConnectionId:fe532dc6-ebbc-41e7-921b-a37d7a34c0b3 Error Number:8003,State:1,Class:16
2021-08-26 09:49:02.917: Request headers: [   "Cache-Control",   "Connection",   "Content-Length",   "Accept",   "Accept-Encoding",   "Accept-Language",   "Cookie",   "Host",   "User-Agent",   "Upgrade-Insecure-Requests" ]
2021-08-26 09:49:02.917: Request item keys: [   "DynamicwebLiveIntegrationIsIntegrationActive",   "eCommerce.Price.CachedPrices",   "owin.Environment",   "DynamicwebLiveIntegrationCanCheckPrice",   "EcomCart:CustomCartContext",   "Product.UnitStock.30008...",   "PagePermissionWithInheritanceFrontend2475",   "Price.PROD2..LANG1..EUR.SHOP14..0",   "PagePermissionWithInheritanceFrontend2211",   "MS_HttpRequestMessage",   {},   "PermissionContextStack",   "DynamicwebLiveIntegrationEnabledAndActive",   "Dynamicweb.OMC.VisitContext",   "MywebsiteLiveIntegrationAddInWebServiceURI",   "AspSessionIDManagerInitializeRequestCalled",   "alternateUrlKey",   "ExecutionTableMapper",   "AspSession",   "DWPAGEVIEW",   "PagePermissionWithInheritanceFrontend3413",   "Dynamicweb.Environment.Web",   "Dynamicweb.Tracking.Tracker" ]
2021-08-26 09:49:02.917: Request form: []

 

 
Tomas Gomez
Reply

Actually, the trace I copied above is the last of four concatenated errors.

The trace of the first error is this (I removed a repetitive part for clearness):

Description: SELECT FieldValueProductId, FieldValueProductVariantId, FieldValueProductLanguageId, FieldValueFieldCategoryId, FieldValueFieldId, FieldValueValue FROM EcomProductCategoryFieldValue WITH (NOLOCK) WHERE FieldValueProductId IN @p0,@p1,@p2,@p3,@p4,@p5, [--- MORE PARAMS REMOVED---]

Exception type: SqlException

2021-08-26 12:58:48.478: SELECT FieldValueProductId, FieldValueProductVariantId, FieldValueProductLanguageId, FieldValueFieldCategoryId, FieldValueFieldId, FieldValueValue FROM EcomProductCategoryFieldValue WITH (NOLOCK) WHERE FieldValueProductId IN (@p0,@p1,@p2,@p3,@p4,@p5, [--- MORE PARAMS REMOVED---]   ,N'PROD10718',N'PROD10719',N'PROD10727',N'ImportedPROD3366',N'ImportedPROD3367',N'ImportedPROD3368'). System.Data.SqlClient.SqlException (0x80131904): The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at 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)
at 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)
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 Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior) ClientConnectionId:37926fa8-b5db-4b87-9ffc-e78ef2ad3964 Error Number:8003,State:1,Class:16
2021-08-26 12:58:48.493: Request headers: [   "Cache-Control",   "Connection",   "Content-Length",   "Accept",   "Accept-Encoding",   "Accept-Language",   "Cookie",   "Host",   "User-Agent",   "Upgrade-Insecure-Requests" ]
2021-08-26 12:58:48.509: Request item keys: [   "DynamicwebLiveIntegrationIsIntegrationActive",   "eCommerce.Price.CachedPrices",   "PagePermissionWithInheritanceFrontend2478",   "owin.Environment",   "DynamicwebLiveIntegrationCanCheckPrice",   "EcomCart:CustomCartContext",   "Product.UnitStock.30008...",   "Price.PROD2..LANG1..EUR.SHOP14..0",   "PagePermissionWithInheritanceFrontend2211",   "MS_HttpRequestMessage",   {},   "PermissionContextStack",   "DynamicwebLiveIntegrationEnabledAndActive",   "Dynamicweb.OMC.VisitContext",   "QubbosLiveIntegrationAddInWebServiceURI",   "AspSessionIDManagerInitializeRequestCalled",   "alternateUrlKey",   "ExecutionTableMapper",   "AspSession",   "DWPAGEVIEW",   "PagePermissionWithInheritanceFrontend3413",   "Dynamicweb.Environment.Web",   "Dynamicweb.Tracking.Tracker" ]
2021-08-26 12:58:48.509: Request form: []

 

 
Tomas Gomez
Reply

I fixed it... temporarily, as I don't understand why.

The page with the issue is a simple page with only one paragraph. The paragraph contains a Catalogue App with a customized template.

  • When disabling the paragraph there was no error (the page was rendered empty).
  • When setting the "List" template to null there was no error (the page was rendered empty).
  • When setting the "Products per page" to one there was no error (the page rendered one product).

After restoring the original settings the error was no more. That is, the configuration is the same as before but the error has dissapeared.

Could this testing reset or have a hidden effect on anything thus fixing the issue?

Regards
Tomas

 

PD: Just in case you need more info about the aforementioned concatenated errors, they are

 

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

New DEvOps 4498 has been submitted against the issue related to shop deleting to research and try to fix. Thanks.

BR, Oleg QA

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi Tomas,

I was not able to reproduce the issue with PC(index/groups)/PC for View model on enviromnent based on DW9.10.13 and has many thousands of product. I've used base templates. Could you please provide URL to your solution to have a look at this. Thanks.

BR, Oleg QA

 

 
Tomas Gomez
Reply

Hi Oleg,

Thanks for your attention. I sent  you a private mail with the error URL.

Regards,
Tomas

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply
This post has been marked as an answer

Hi

The issue related to the exception on rendering of product list has been separated by new DevOps 4576. Thanks.

BR, Oleg QA 

Votes for this answer: 1
 
Tomas Gomez
Reply

Thanks for the confirmation

BR Tomas

 
Tomas Gomez
Reply
This post has been marked as an answer

Hi, 

Just in case somebody experience the same issue, it was finally solved by updating the Dynamicweb.Ecommerce.dll to version 1.10.97

Regards,
Tomas

Votes for this answer: 1

 

You must be logged in to post in the forum