API sometimes returns 502

So we rely a lot on the API to get contacts information like tags etc.
We use the API in many different ways (our custom dashboard, Make.com and Zapier)
And in all platforms, we randomly get sometimes 502 errors. Our error logs shows it, make.com shows it, and zapier shows it, and they all have different connections and different use cases.
Our automations and systems has been setup for over a year and everything works as it is, but sometimes for some reason we get those 502 errors. When retry the same call again it works without the error.

Any idea why this happens? is this a known issue? How can we resolve this?

Thank you in advance.

A 502 bad gateway message indicates that one server got an invalid response from another. In essence, you’ve connected with some kind of interim device (like an edge server) that should fetch all of the bits you need to load the page. Something about that process went wrong, and the message indicates the problem.

We have an integration with Make.com that just gets tags from a contact’s email. Out of every 200 times it works successfully, it failed once randomly. Nothing is changing from our end. Same automation, same integration, same request. Fails 0.5 to 1 % of the time with 502 error.

If we manually rerun the failed request, it works without any change from our end. Hows that possible without that being a bug from Keap API?

We’ve been getting more and more [502] Unexpected EOF at target errors!

Anyone experiencing this??

Hi @nick-m,

I am not experiencing this at the moment.

As an estimation how many API calls would your integrations be doing per day?

Do you have a lot of Contacts, Tags, Campaigns in your account?

Cheers

Hi @Pav ,
We’re doing few thousands calls per day. Yes we have over 100K contacts on our app.

The 502 happens regularly and consistently with several of our integrations (make.com, zapier, and custom integration). Same API call works when we retry it again, its just randomly failing and giving 502.

Any suggestion is appreciated.

Thanks

I have a feeling it could be the amount of API Calls that are being done at particular times.

Checking the forum for 502 Errors that were mentioned before, the odd times it was related to the person browser, or what API Calls they were doing, or an issue with Keap Servers. Most of those could be rectified by doing different things, or if Keap had to fix something.

In your case, as you have various integrations in play, the amount of API Calls are more likely being the factor here.

Are the 502 Errors occurring at specific times during the day?

You can raise a Developer Support Ticket below to ask the team to count and check the API Calls for when have the 502 Errors.

https://developer.infusionsoft.com/support/tickets/create/

Tagging @TomScott for additional insight into this.