stripe / stripe-cli

A command-line tool for Stripe
https://stripe.com/docs/stripe-cli
Apache License 2.0
1.59k stars 371 forks source link

Client.Timeout exceeded while awaiting headers #710

Closed ycandrewkao closed 2 years ago

ycandrewkao commented 3 years ago

The more information we have the easier it is for us to help. Feel free to remove any sections that might not apply

Issue

I was testing subscription webhook locally. Our webhook is running using Azure Function (which was running locally at the time). We used stripe listen --forward-to <localhost> command. However, are are seeing Client.Timeout exceeded while awaiting headers error seemingly randomly. What could be causing that? How do we fix it? Our server is using Azure Function, which has a 5 min timeout, which we are definitely not hitting.

Expected Behavior

We expect it to work all the times.

Steps to reproduce

It seems to happen randomly.

Traceback

See screenshot

Environment

mocOS Screen Shot 2021-07-21 at 10 28 49 AM

pepin-stripe commented 2 years ago

Hi @ycandrewkao,

The CLI has a timeout of 30 seconds when proxying events to another endpoint (in your case set with --forward-to http://localhost:7071/stripewebhook), so it seems like this is what we're seeing here. Would that make sense? Do you see the timeout error being logged ~30s after the event was received the CLI?

pepin-stripe commented 2 years ago

Closing this out but please feel free to re-open if you have additional questions!

gabrielmsoptimalex commented 1 year ago

I'm having the same issue. And yes the "FAIL" message does appear 30s after the request.

Screen Shot 2022-12-14 at 12 15 20
banagale commented 1 year ago

@pepin-stripe

Closing this out but please feel free to re-open if you have additional questions!

Mentioned this in #1010, but it would be cool if this could be configured.

That way conditional logic on any given POST could be debugged for at least a few minutes without having to repeat checkout config and submission that triggered the issue.