Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the upgrade script for Picture and PictureBinary tables #3357

Closed
AndreiMaz opened this issue Oct 6, 2018 · 5 comments
Closed

Bug in the upgrade script for Picture and PictureBinary tables #3357

AndreiMaz opened this issue Oct 6, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@AndreiMaz
Copy link
Member

nopCommerce version: 4.10

Steps to reproduce the problem: https://www.nopcommerce.com/boards/t/55655/bug-in-nopcommerce-410-upgrade-script-for-picture-and-picturebinary-tables.aspx

@AndreiMaz AndreiMaz added the bug label Oct 6, 2018
@AndreiMaz AndreiMaz added this to the Version 4.20 milestone Oct 6, 2018
@jc9999jc
Copy link

I also encountered this bug.

I have several scenarios with this bug.

After monitoring the CPU usage with VS diagnostic tool It take about 2000ms to go throw
GetPictureUrl method (IPictureService).

I have a service that retrieve products with pictures prices and more..

This bug is also reflected , but unfortunately it's not the only bug. I also found same behavior for the following methods:

GetFinalPrice (IPriceCalculationService)
GetProductPrice (ITaxService)

Last thing, I have a service that runs and deletes records (usually more than thousands for each run). After running the websites uses 90% CPU and the website crashes.

I made a little investigation and found out that the problem comes form Nop.Data. EFReposidotry library.

I believe it's something with the new .Net Core 2.1 framework.


In order to simulate the environment you should use nopCommerce database 4.00 version and then to run the update script for 4.10 version.

In my opinion this bug is suitable for fatal status. Right now websites fall down after requesting one of the services that use theses methods.

@jc9999jc
Copy link

I found DynamicProxyGenAssembly2 --> Castle.Proxies.PictureProxy get_PictureBinary method with CPU time consumption of 90%

skoshelev added a commit that referenced this issue Nov 1, 2018
…le size after upgrade nopCommerce from 3.90 to 4.00 version
@skoshelev
Copy link
Contributor

Hi @jc9999jc Can you open a new issue and add more detail of your problem?

@skoshelev
Copy link
Contributor

Closed #3357

@jc9999jc
Copy link

jc9999jc commented Nov 8, 2018

OK.

You can go to PrepareProductListModel func from Nop.Web.Areas.Admin.Factories.ProductModelFactory

make the product search without page index: like this:

        //get products
        var products = _productService.SearchProducts(showHidden: true,
            categoryIds: categoryIds,
            manufacturerId: searchModel.SearchManufacturerId,
            storeId: searchModel.SearchStoreId,
            vendorId: searchModel.SearchVendorId,
            warehouseId: searchModel.SearchWarehouseId,
            productType: searchModel.SearchProductTypeId > 0 ? (ProductType?)searchModel.SearchProductTypeId : null,
            keywords: searchModel.SearchProductName,
            //pageIndex: searchModel.Page - 1, pageSize: searchModel.PageSize,
            overridePublished: overridePublished);

try to run it.

The result is that you will need to wait more than 15 minutes for list of 1000 items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants