- 最新
- 最多得票
- 最多評論
Looks like this sort of works around running the tool, but the metadata key we used to use seems to have changed
sudo bash -c 'GEM_PATH=/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0 /opt/rubies/ruby-2.2.10/bin/ruby /opt/elasticbeanstalk/lib/ruby/bin/get-config meta -k sqsdconfig'
Path AWS::ElasticBeanstalk::Ext||_SqsDaemonConfigFileContent doesn't exist in metadata.
Slightly off of the topic, but is there a recommended way to find out the SQS visibility timeout in a worker env?
The whole usage of get-config was to find that out so we can adjust the nginx timeout to match:
commands:
match_nginx_timeout_to_sqs_timeout:
command: |
# If worker tier set nginx timeout to SQS visibility timeout
if /opt/elasticbeanstalk/bin/get-config meta -k sqsdconfig 2>/dev/null; then
VISIBILITY_TIMEOUT=$(/opt/elasticbeanstalk/bin/get-config meta -k sqsdconfig | jq -r .visibility_timeout)
echo "proxy_read_timeout ${VISIBILITY_TIMEOUT}s;" > /etc/nginx/conf.d/worker.conf
service nginx restart
fi
Otherwise nginx can timeout too early and cause worker job retries (and pileup of jobs)
Edited by: matschaffer-safecast on Dec 4, 2019 12:25 AM
Looks like I figured it out. /opt/elasticbeanstalk/bin/get-config meta -k sqsdconfig
still works just only as root (not ec2-user like I was trying)
And the missing Path AWS::ElasticBeanstalk::Ext||_SqsDaemonConfigFileContent doesn't exist in metadata.
was due to what should have been a worker tier env having been started as a web tier.
相關內容
- 已提問 6 個月前
- AWS 官方已更新 3 個月前
- AWS 官方已更新 4 個月前