Recently I tried to add a domain from my Magento Cloud Dashboard. The Log throws me a error with SSL, but the real problem is that after that error it go next to "Re-deploying environment" and it has been more than two hours like this, with the status of the process in "In process" and the general state of the branche in "Building"

Building application 'mymagento' (runtime type: php:7.1, tree: 2a8a1c6)
Reusing existing build for this tree ID

Provisioning certificates
Validating 1 new domain E: Error validating domain mydomain.com: Couldn't complete challenge Unable to validate domains mydomain.com, will retry in the background.
(Next refresh will be at 2018-10-17 14:44:09.393929+00:00.)
Environment certificates

W: Missing certificate for domain mydomain.com

Re-deploying environment My Magento Cloud ID

But, on var/log/cloud.log the process looks to be finished two hours ago:

[2018-10-17 14:34:25] NOTICE: Starting deploy. (magento/ece-tools version: 2002.0.14, magento/magento2-base version: 2.2.5)
[2018-10-17 14:34:25] INFO: Starting pre-deploy.
[2018-10-17 14:34:25] INFO: Skip copying directory ./var/view_preprocessed.
[2018-10-17 14:34:25] INFO: Clearing ./var/view_preprocessed
[2018-10-17 14:34:25] INFO: Clearing redis cache
[2018-10-17 14:34:25] INFO: redis-cli -h redis.internal -p 6379 -n 1 flushdb
[2018-10-17 14:34:25] INFO: Recoverable directories were copied back.
[2018-10-17 14:34:25] INFO: Set Magento application mode to 'production'
[2018-10-17 14:34:25] NOTICE: Enabling Maintenance mode
[2018-10-17 14:34:25] INFO: php ./bin/magento maintenance:enable --ansi --no-interaction
[2018-10-17 14:34:35] INFO: Disable cron
[2018-10-17 14:34:35] INFO: Trying to kill running cron jobs
[2018-10-17 14:34:35] INFO: exec pgrep -U "$(id -u)" -f "bin/magento cron:run"
[2018-10-17 14:34:35] INFO: Running Magento cron processes were not found.
[2018-10-17 14:34:35] INFO: Validating configuration
[2018-10-17 14:34:35] INFO: Checking if db exists and has tables
[2018-10-17 14:34:35] INFO: Magento was installed on Wed, 12 Sep 2018 18:11:02 +0000
[2018-10-17 14:34:35] INFO: End of validation
[2018-10-17 14:34:35] INFO: Checking if db exists and has tables
[2018-10-17 14:34:35] INFO: Magento was installed on Wed, 12 Sep 2018 18:11:02 +0000
[2018-10-17 14:34:35] INFO: Starting update.
[2018-10-17 14:34:35] INFO: Updating configuration from environment variables.
[2018-10-17 14:34:35] INFO: Updating env.php.
[2018-10-17 14:34:35] INFO: Updating env.php cron consumers runner configuration.
[2018-10-17 14:34:35] INFO: Updating env.php DB connection configuration.
[2018-10-17 14:34:35] INFO: Updating cache configuration.
[2018-10-17 14:34:35] INFO: Updating session configuration.
[2018-10-17 14:34:35] INFO: Updating search engine configuration.
[2018-10-17 14:34:35] INFO: Set search engine to: mysql
[2018-10-17 14:34:35] INFO: Skipping URL updates
[2018-10-17 14:34:35] INFO: The value of the property 'directories/document_root_is_pub' set as 'true'
[2018-10-17 14:34:35] INFO: Not updating env.php backend front name. (ADMIN_URL not set)
[2018-10-17 14:34:35] INFO: Running setup upgrade.
[2018-10-17 14:34:35] INFO: /bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade --keep-generated --ansi --no-interaction  | tee -a /app/var/log/install_upgrade.log"
[2018-10-17 14:34:43] INFO: Checking if db exists and has tables
[2018-10-17 14:34:43] INFO: Magento was installed on Wed, 12 Sep 2018 18:11:02 +0000
[2018-10-17 14:34:43] INFO: Updating admin credentials.
[2018-10-17 14:34:43] INFO: Clearing pub/static
[2018-10-17 14:34:43] INFO: Clearing var/view_preprocessed
[2018-10-17 14:34:43] INFO: Generating fresh static content
[2018-10-17 14:34:43] INFO: Extracting locales
[2018-10-17 14:34:43] INFO: Generating static content for locales: es_MX en_US
[2018-10-17 14:34:43] INFO: php ./bin/magento setup:static-content:deploy --ansi --no-interaction -f --jobs 1 --no-html-minify es_MX en_US
[2018-10-17 14:37:56] INFO: which timeout
[2018-10-17 14:37:56] INFO: which bash
[2018-10-17 14:37:56] INFO: /usr/bin/timeout -k 30 600 /bin/bash -c 'find '\''/app/pub/static'\'' -type d -name '\''DELETING_*'\'' -prune -o -type f -size +300c '\''('\'' -name '\''*.js'\'' -or -nam$
[2018-10-17 14:38:01] INFO: Enable cron
[2018-10-17 14:38:01] INFO: Post-deploy hook enabled. Cache cleaning and pre-warming operations are postponed to post-deploy stage.
[2018-10-17 14:38:01] INFO: php ./bin/magento maintenance:disable --ansi --no-interaction
[2018-10-17 14:38:02] NOTICE: Maintenance mode is disabled.
[2018-10-17 14:38:02] NOTICE: Deployment completed.

I tried again to remove domain and add it again, but this process stuck on Pending because they can´t run until the "In Process" process finish.

I submit a P2 Ticket to Magento, but until now they have not answered me and it is urgent for me to solve this. Is there any way to manually remove that process that got stuck from the dashboard or from the SSH?

  • Have you fixed this.? Is there any solution for this? Commented Sep 12, 2019 at 11:20

4 Answers 4


If you can SSH into the machine, use vendor/bin/ece-tools cron:kill

If that produces an error or doesn't resolve the issue, then creating a ticket is the best way. Usually picked up and resolved pretty quickly if filed as (Stuck Deployment)


1 - Access the instance that's stuck.

magento-cloud ssh -e development

2 - Find the background service running the deployment as in the image below.

ps -aux
kill 2861

Magento Cloud deployment tasks stuck

3 - If you have many deployment tasks stuck, you might need to wait a couple of minutes, access the server again kill and stop the cronjobs and after 5 minutes you will see the new deployment tasks running as in step 2.

vendor/bin/ece-tools cron:kill
vendor/bin/ece-tools cron:disable
ps -aux
kill 2861

My solution is to ssh inside the environment and kill consumers:

mgc ssh -e {environment}
ps -aux -> to identify the job id of the consumers
kill {job-id}

deploy will stop immediately and then i redeploy. Not the best workaround but it works and you avoid to wait for Magento support.


In my case, I have to use the following below commands as I didn't find any ongoing deploy process using ps -aux

  1. vendor/bin/ece-tools cron:kill
  2. vendor/bin/ece-tools cron:unlock

After 4-5 Seconds the status of the process in "In process" changed

Your Answer

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

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