#Steve Sizer
1 messages · Page 1 of 1 (latest)
Hello
Not aware of anything changing specifically. Can you give me an example and more details?
evt_1MEGUqCrlUC0RmrTaY9Cj4WY
and this is the error message in AppSignal
Timed out connecting to Stripe (https://api.stripe.com/). Please check your internet connection and try again. If this problem persists, you should check Stripe's service status at https://status.stripe.com/, or let us know at support@stripe.com.
(Network error: execution expired)
Hmm are you responding to the Event immediately before doing any other async processes?
This is on my rails server
specifically in app/webhooks/invoice_paid.rb:5
invoice = event.data.object
if invoice.charge
charge = Stripe::Charge.retrieve(invoice.charge)
end
everything has been working just fine no issues and today bam!!! so many timeouts
Hmm so you are waiting to retrieve the Charge before responding to the Webhook though?
That is in the webhook
Right that is within the endpoint. I'm just asking at what point you send back a 200 stating you have received the Event
At the end
The recommended route here is to do that immediately, before anything else, otherwise you can run into a timeout since the timeout window is pretty short. That said it is odd you weren't seeing this before today. Looking more to see if I can tell anything from my end
Thats only one instance. I get a timeout in the following controller also:
app/controllers/api/v1/setup_intent_controller.rb:11 create
Yep the timeout just means your server didn't respond to the incoming Webhook fast enough
class Api::V1::SetupIntentController < ApplicationController
def create
if @current_user.stripe_id.blank?
customer = Stripe::Customer.create(
email: @current_user.email,
name: @current_user.name
)
@current_user.update(stripe_id: customer.id)
end
@intent = Stripe::SetupIntent.create({
customer: @current_user.stripe_id,
})
end
end
I wouldnt have thought i would of got a timeout in the above though
Where is the actual successful response coming from?
Any kind of processing you want to perform, we suggest doing that after you respond to the webhook delivery request
The above controller is for a different timeout which isn't connected to a webhook
see image above
Ok that's different
That looks like your server is having trouble reaching ours.
Are you subject to any network filters? If so, you need to ensure that all Stripe API IPs are allowed:
https://stripe.com/docs/ips#ip-addresses
I can logon to the server and make a call using the rails console and connect
It's possible for it to work most of the time / intermittently if you've allowed IP addresses but say a new one isn't listed
have any of these ip addresses been added recently? It seems weird how everything has been working up until today
Not in some time (a couple of years ago)
Yeah this is so weird wonder why i'm having all the issues....
You can also try our reachability helper to see if it identifies any issues for you: https://github.com/stripe/stripe-reachability#usage