PLEASE help us help you by writing a good post!
We’re having an issue where function call is resulting in a 502 error, timeout after 10.01 seconds.
I also have seen that if we upgrade our account, we can also get the timeout upped to 26s, and we might do that, but I’d like to understand the underlying issues first.
The background API calls can go longer than 10s. You could try running there to log timing information. My guess is you’re making a call to a third party API, you don’t have a time limit for the call, and it’s never completing because of some bug somewhere, but that’s just an idle guess. You need to do some kind of logging to know why.
The only 3rd party service we’re accessing in this function is AWS RDS. Is it possible that queries we are doing locally, with the exact same data, take only 89ms but on Netlify take > 10s? I’m 99% sure nothing is throwing because we’d see that in the logs or in sentry. But yeah I can instrument this function more to see exactly how far it is getting and how long each step is taking.
Ok, sorry, you were right! One of our external calls is not returning within 10s and we have that mocked in dev. Thanks!