Can't set PerRequestTimeoutSeconds for TCP services w/ CDK? #35634
atomicHamsters
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are building a website which runs across several ECS Fargate services and we are using CDK to standup/teardown instances. Some API requests between these services are timing out because they take > 15sec.
I found the timeout on Service Connect configuration and it seemed like the perfect solution:
And it was supported in CDK:
Turns out, setting request timeout seconds is not supported for TCP app protocols.
Error:
❌ SharedEnterpriseStack failed: _ToolkitError: The stack named EnterpriseStack failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "Invalid request provided: Per request timeout 420 can't be set for tcp application.
Documentation confirms this message:
"perRequestTimeout can only be set if Service Connect appProtocol isn't TCP. Only idleTimeout is allowed for TCP appProtocol."
We don't want to use UDP but we need increased request timeouts. I was able to get around the constraint by using the CLI and it worked as expected. Now, I need to script a process to increase the timeouts as we scale with more instances.
This restriction seems arbitrary and inconvenient. Does anyone know why we shouldn't set request timeouts for TCP appProtocols? Willl support be added in the future??
Beta Was this translation helpful? Give feedback.
All reactions