skip to Main Content

We are on magento 2.3 version.

After code change when we run setup:upgrade, our mysql server gets stuck. We noticed there are a lot of alter queries running on db during this.
As our table size is large, the DB stuck with these alter queries.
Does running setup:upgrade runs several alter queries on sales and quote related tables ?
Can we exclude this queries from magento setup upgrade or any alternate to keep db healthy ?

Error:

Updating modules:
Schema creation/updates:
Warning: PDOStatement::execute(): MySQL server has gone away in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228
command terminated with exit code 1

2

Answers


  1. Chosen as BEST ANSWER

    Got the solution, we are running magento os with MariaDB.

    There was a compatibility issue with Mariadb, got fixed following below URL.

    Had put the patch on magento for the fix.

    So basically on every setup upgrade it was running numbers of alter queries even if there is no change in schema.

    https://github.com/magento/magento2/issues/19597


  2. Try with this –

    php -dmemory_limit=6G bin/magento setup:upgrade
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search