Solved

Track API: GOAWAY received

  • 17 November 2021
  • 5 replies
  • 227 views

Badge +2

I have a custom integration tracking user events via the “Track API”. Before I submit the GET /track?data={{data}} request, I open an HTTP2 connection.

Things work fine, for the most part. However, during a 24 hours period, and in a random fashion, my HTTP2 connection gets terminated. My application really never becomes dormant and I still see this error during peak hours.

 

Is there something I can do on my side, when working with http2 connections, to prevent the klaviyo host from terminating my connection? I’ve already verified that nothing in my infrastructure is killing my tcp connection.

icon

Best answer by David To 19 November 2021, 20:45

View original

5 replies

Userlevel 7
Badge +58

Hey there @angel.mendoza@daveramsey.com,

To get some clarity on what could be going wrong, I’d like to open with a few questions.

Do you happen to have a retry mechanism in place for your setup? If you happen to get a 500 error when attempting a connection, what steps do you take to retry the call at any given time increment? Sometimes its something that could happen with any app’s api from Facebook to Google to Hubspot but wise approach is to sleep for a 1 second or so and retry the call that failed.

 

Let us know any updates!

Alex

Badge +2

Hey there @angel.mendoza@daveramsey.com,

To get some clarity on what could be going wrong, I’d like to open with a few questions.

Do you happen to have a retry mechanism in place for your setup? If you happen to get a 500 error when attempting a connection, what steps do you take to retry the call at any given time increment? Sometimes its something that could happen with any app’s api from Facebook to Google to Hubspot but wise approach is to sleep for a 1 second or so and retry the call that failed.

 

Let us know any updates!

Alex

Hi Alex

 

I do have a retry mechanism in place. It’s implemented with an exponential backoff algorithm.

I do not get a 500. Right when I attempt to make the http call, my program throws an IOException due to the error at a lower layer in the network stack. Essentially, the connection got terminated by the remote host (klaviyo)

The Http connection gets created on the retry which is why this is not a big deal. I am looking for guidance from you guys as to how long will it take your host to kill my HTTP2 connection so I can tune my http client configuration

Userlevel 7
Badge +58

Thanks for the info @angel.mendoza@daveramsey.com,

I think we might need a few more details to understand what might be going on. 

  1. What did you try to call exactly and what are you getting?
  2. Is this a timeout?

Thanks for the cooperation!

Alex

Badge +2

Thanks for the info @angel.mendoza@daveramsey.com,

I think we might need a few more details to understand what might be going on. 

  1. What did you try to call exactly and what are you getting?
  2. Is this a timeout?

Thanks for the cooperation!

Alex

  1. Klaviyo’s Track API
  2. It’s not a request time out.  It’s not a connection timeout. Apparently, it’s the remote host (Klaviyo) saying the HTTP2 connection has lived for too long and it terminates it
Userlevel 7
Badge +60

Hey @angel.mendoza@daveramsey.com,

I think it would be really helpful if you can provide an example call of the Track API you are making that gets terminated. Remember to hide any sensitive data such as your Klaviyo IDs, etc. 

If you are uncomfortable sharing this information sometimes it may be more appropriate reaching out to our support channels who can assist you further in seeing the types of calls you are making specific to your account. 

David

Reply