#Robin020

1 messages · Page 1 of 1 (latest)

blissful quartzBOT
warm heron
#

hi! what exactly do you mean by loading the session? There's multiple parts involved there potentially(calling your backend server from the frontend, the backend calling our /v1/checkout/sessions API, then the redirect from the frontend to the CheckoutSession URL), so it really depends what part you mean and how much you've measured the actual individual parts.

teal dagger
#

I see

#

I had this problem last week, your colleague asked for a cs id

#

Is there any way you can check the Stripe side?

warm heron
#

I can check some things with an ID yes

teal dagger
#

Where can I find the id?

warm heron
warm heron
#

sure. So for context I opened that page just now and it loaded immediately, and the API request that was used to create the Session(https://dashboard.stripe.com/logs/req_gWG6l7ZIJl64hV) eas executed in 0.6 seconds according to our logs. Where did you see 20 seconds exactly?

teal dagger
#

i counted ..

#

So the problem is in my own redirect

warm heron
#

maybe, hard for me to say, I don't know what your code does beyond making that API call to us, and what exactly you see on your side/in your browser

teal dagger
#

Frond end is in Google Firebase

#

I didnt expect that to deliver such a delay

#

My code only creates a checkout session

#

Customized with some parameters

warm heron
#

have you added any logs or such to investigate what's happening? Like log the exact time you make the API call to stripe.checkout.sessions.create(...) and the exact time you return a 3xxx status to the frontend(if that is how you've implemented it).

teal dagger
#

I am logging when the CS is created

#

it seems to only take a lot time the first time

#

Like I need to wake up the server

#

I dont know if that is possible

#

What is the 3xxx status?

warm heron
#

you should check the docs of your platform(this Render thing) about how to maybe have an always-on server or faster start up, lots of services like that will have cheaper tiers where the server is put to sleep when not active for a while