2

enter image description here

I am running php bin/magento setup:upgrade command after migration from one aws instance to another Instance and It is hanged and stuck not moving forward??

4
  • I would suggest to check the log files and also check the directory var, pub and generation permission.
    – Nits
    Sep 10, 2020 at 17:00
  • It runs but take a lot of time Sep 10, 2020 at 17:00
  • did you check log file?
    – Nits
    Sep 10, 2020 at 17:01
  • No I am checking Sep 10, 2020 at 17:15

3 Answers 3

5

please enable verbose mode or run command with strace

bin/magento setup:upgrade -vvv

and tail magento logs to see whats going on,

strace -s 99999 bin/magento setup:upgrade

see at the end whats going on

3
  • -bash : strace : command not found Sep 10, 2020 at 11:07
  • you can install strace package :)
    – MagenX
    Sep 10, 2020 at 11:29
  • thanks i can see what is going on my magento install, before it just hung on setup:install
    – Sebastian
    Jun 20, 2021 at 1:30
1

You can check by run below command:

strace -s 99 bin/magento setup:upgrade

More about strace

Also, check your MySQL has not run any related process, you found then kill it. (Not KILL ALL, only related Processes need to kill)

SHOW FULL PROCESSLIST

kill ProcessID

In My case customer_visitor table cause an error and stops the command. After debugging more in DB, there are many entries, so he takes more time to run and stop the upgrade command execution.

I remove all entries from customer_visitor table and then It's working.

TRUNCATE TABLE customer_visitor;
0

don't forget to check stale cron:run processes before deployment (setup:upgrade) If you find it then kill it and clean them in cron_schedule table as well

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.