You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the Ec2Meta group of template functions, there's a 500ms timeout on the HTTP client: https://github.com/hairyhenderson/gomplate/blob/master/aws/ec2meta.go#L56, but for the Ec2Info functions (i.e. the ones that use aws-sdk-go), no such timeout is set, and I've been observing up to 20s timeouts.
For example:
$ docker run -it --rm --entrypoint '' hairyhenderson/gomplate bash
root@dde9d13c242b:/go/src/app# echo '{{ec2region}}' > r.json
root@dde9d13c242b:/go/src/app# echo '{{ec2tag "foo"}}' > t.json
root@dde9d13c242b:/go/src/app# time gomplate < r.json
unknown
real 0m0.511s
user 0m0.000s
sys 0m0.010s
root@dde9d13c242b:/go/src/app# time gomplate < t.json
real 0m20.901s
user 0m0.010s
sys 0m0.000s
Note that this doesn't always happen -- when I run on my mac, ec2tag times out quickly:
$ echo '{{ec2region}}' | time gomplate
unknown
gomplate 0.01s user 0.00s system 2% cpu 0.518 total
$ echo '{{ec2tag "foo"}}' | time gomplate
gomplate 0.01s user 0.01s system 1% cpu 0.897 total
Note that this is still longer than 500ms...
The text was updated successfully, but these errors were encountered:
For the
Ec2Meta
group of template functions, there's a 500ms timeout on the HTTP client: https://github.com/hairyhenderson/gomplate/blob/master/aws/ec2meta.go#L56, but for theEc2Info
functions (i.e. the ones that useaws-sdk-go
), no such timeout is set, and I've been observing up to 20s timeouts.For example:
Note that this doesn't always happen -- when I run on my mac,
ec2tag
times out quickly:Note that this is still longer than 500ms...
The text was updated successfully, but these errors were encountered: