macopedia / magmi-m2

Magmi GitHub, see branch magento2 for a version compatible with Magento 2
113 stars 53 forks source link

First import of 20K products in 17mins, second import takes about 1 hour. #73

Open EnigmaWebdesign opened 4 years ago

EnigmaWebdesign commented 4 years ago

// Provide a general summary of the issue in the Title above

Preconditions

// Provide a more detailed information about you Magento, Apache2/nginx, PHP & MySQL version // Provide example CSV file to help us reproduce your issue We're using Magento 2.2.7 on Apache2, PHP 7.1 & Mysql 5.7.29.

Steps to reproduce

// Provide a list of steps to reproduce this bug, include which plugins you use // You can attach your magmi profile files stored in directory "{your Magento dir}/magmi/conf/{your profile name directory} We have a fresh database, we take the CSV and import about 20K products. In 17 mins all data is imported. screencapture-magmi

Actual result

// Tell us what happens instead - screenshot, logs etc.

The second time we import the same CSV file it takes about 1 to 1,5 hours to finish (sometimes it stuck at 97% or 99%).

Why is the import, running for a second time, taking so long to import?

Cheers,

Steve

tmotyl commented 4 years ago

Hi @EnigmaWebdesign Please recheck your report. There is no Magento 2.7. Also MySQL 4.9.4 is an ancient version, and I'm pretty sure Magento requires MySQL > 5.6

Please also attach additional data like magmi profile, as requested in the issue template.

EnigmaWebdesign commented 4 years ago

Hi tmotyl,

My apolgies. I created this ticket when things got wicked in the office. I fixed my Magento version and checked my MySQL version (now fixed) and I attached a screenshot of the current Magmi configuration.

Many thanks,

Steve

EnigmaWebdesign commented 4 years ago

I have checked with the hosting provider where the site is hosted. We are currently importing the CSV file (+/- 100MB) with option to create new products and update excisting ones.

This is what they saw in the logs: 280322 | plc2day_mro | localhost | plc2day_mro | Query | 0 | updating | DELETE FROM url_rewrite WHERE entity_id='7109' AND entity_type = 'product' AND is_autogenerated=1 | 0 | 339509 |

It does this constantly with every product. Question is, why are all product url's rewritten. This shouldn't happen during import in my opinion.

HOSTED-POWER commented 4 years ago

It's indeed strange to see so many url rewrite delete going on when doing a "simple" update ;)

EnigmaWebdesign commented 4 years ago

Ok,

I solved this one myself. I unchecked On the fly indexer which was the one creating rewrites after the import. Now it's working fine. I'm using the CLI interface since it's great to use with cronjobs.

Cheers,

Steve