-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting timeouts when running on AppRunner #13
Comments
I haven't tried it in AppRunner myself, but can you confirm if your environment has outbound Internet access? It'll need that in order to reach the AppConfig API endpoint. There's some documentation here around it: https://docs.aws.amazon.com/apprunner/latest/dg/network-vpc.html (I see there's a note about one-time latency for a custom VPC connector for outbound traffic too.) (Edit: If your VPC doesn't have internet access and you don't want it to, you could look at VPC Endpoints for AppConfig instead - on the same page as linked above.) |
Hi @jamesoff, For now I'm moving to redis and RDS and im just caching some custom flags. Kind if a pain |
Ok, thanks for the confirmation. I'll give it a go myself to see if I can reproduce it. If you just need some small values or flags, Systems Manager Parameter Store may be a suitable alternative in the meanwhile? |
Yeah in a sense, we use SSM for our environment variables. It's just the integration for real time feature flags doesn't seem as good. I just wanted that "live" feel. Running locally was really cool, instant responses, didn't cause any delay to our app, and just worked. But yeah if we can't sort this out I'm fine to kind of keep a DB/Cache alternative. But would be nice to get this working, thanks for the help! |
I had a go at reproducing this and it worked for me. I created an app using the sample code from the README of the repo, and created a container with it which I set up with AppRunner using all the defaults (I did add a region env variable; not sure if that's required or not, this is my first hands-on with AppRunner). The service launches fine and returns the configuration data as the response. I've put the files I used for testing, along with the output of AppRunner's DescribeService call, in a gist in case you want to compare: https://gist.github.com/jamesoff/c6024b79d1cef88769020bd4cfcefc82 |
Apologies for the late response, I never got the notification. Ah yeah you were initially correct. The timeout is due to the HTTP requests not making it out, as the outgoing network traffic is set to custom VPC. It needs to be in the VPC because of my RDS db and cache, etc, but it also needs public access to access the AWS API to manage services. The VPC has outgoing * and inbound * but obviously that doesn't do anything because the AWS Rest API is connected through *.amazonaws.com. Any ideas on the cheapest way to do this? I've seen people suggest NAT gateways or PrivateLink but both of them are really expensive, i want a free solution to connect to AWS API. |
No problem on the delay :) I'm afraid NAT Gateways or a PrivateLink endpoint for AppConfig would be the only ways to make the API reachable from your environment. |
I'm using the same config locally and on app runner, with the same variables, and yet Gunicorn times out as soon as AppConfig gets called.
E.g. I have this code:
Then i get this in my logs:
And this runs a few times. (This also gets accepted into AppRunner bypassing the "Health Check" which is quite concerning for production, but there you go)
Locally it finishes within a second, so I'm not sure why it hangs on AppRunner.
Any help would be appreciated :)
The text was updated successfully, but these errors were encountered: