-
Notifications
You must be signed in to change notification settings - Fork 136
Upgrade to Magento 2.2.4 - Magento_Sales UpgradeData.php - Memory Limit Exceeded / MySQL server has gone away #169
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
Comments
I hit this issue. The solution that worked for me was to is model->clearInstance(); to free memory.
|
I created a SQL statement that does exactly what the
Executing this SQL statement should only take several seconds even for large databases. After this, you can simply add |
@rauberdaniel FYI, someone fixed it for 2.2.7: |
@rauberdaniel Great! This saved me a lot of time for databases with large order numbers. Thanks! |
Issue
When upgrading from 2.2.3 EE to 2.2.4 EE on a site with 4GB of existing data, running bin/magento setup:upgrade fails during the Magento_Sales UpgradeData.php script's fillQuoteAddressIdInSalesOrderAddress() method.
The problem is that the way the fillQuoteAddressIdInSalesOrderAddress() method is constructed it's looping through a fair amount of sales_order_address records (~600,000 in our case) and loading both the order and quote objects on every iteration. That consumes a lot of memory.
Solution
Rather than looping and loading full objects, the update should be done with a single query. See my suggestion here ->
module-sales-upgrade-performance-refactor.txt
The text was updated successfully, but these errors were encountered: