My EB deployments keep failing after spending 10-15 mins trying to deploy. Usually the log at eb-activity.log ends with this.
[2021-03-25T08:28:43.505Z] INFO [1773] - [Application update local-2021-03-25-a@121/AppDeployStage0/AppDeployPreHook/12_update_permissions.sh] : Starting activity...
Sometimes it gets past this after about 15 mins, by which time EB has already given up and decided the deployment is bad.
[2021-03-25T08:43:33.853Z] INFO [1773] - [Application update local-2021-03-25-a@121/AppDeployStage0/AppDeployPreHook/12_update_permissions.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_user
+ EB_APP_USER=webapp
++ /opt/elasticbeanstalk/bin/get-config container -k app_base_dir
+ EB_APP_BASE_DIR=/var/app
++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
+ EB_APP_STAGING_DIR=/var/app/ondeck
++ /opt/elasticbeanstalk/bin/get-config container -k app_logs_dir
+ EB_APP_LOGS_DIR=/var/app/support/logs
+ cd /var/app/ondeck
+ chown -R webapp:webapp /var/app
+ chown -R webapp:webapp /var/log/httpd
+ '[' -f app/SymfonyRequirements.php ']'
Disk usage on the node is only about 30%. I have an attached EFS volume with about 90k files in it, mostly user data files. I suspect the permissions script is trying to update all of those files and taking too long.
But I don't know how to stop it, or if I can increase the time EB will wait for the deployment to succeed.
I've worked around this issue by extending the Command Timeout in the deployment config in EB. The default was 300 seconds.