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