502 Bad Gateway API Errors

Hello -

We’re continuously running into 502 bad gateway errors about every day now. We’re sending data to Contacts and our Custom Object a few times a day, but both objects seem to fail at the same rate. Based on what I’ve read in the other posts, I’ve added retry logic during failure, but that hasn’t seemed to bring it back to a realiable function - we’re still seeing these errors every day which has deemed the API unusable.

Is there some another approach that would better suit the API so we can send/receive data without these consistent 502 gateway failures?

Error: 2021-02-22 15:42:32.85 Code: 0xC0047062 Description: System.Exception: Unexpected failure during data processing ---> "> <!--<head> <title>api.hubapi.com | 502: Bad gateway</title> </head><span>Ray ID: 6259d14f6bb127d8 \•</span>
<span>2021-02-22 15:42:32 UTC</span><p>The web server reported a bad gateway error.</p>

Hey @JParker5

I would suggest getting this to HubSpot support so a specialist can take a closer look. The Community won’t be able to solve this one :disappointed_face:

Hi @JParker5 were you ever able to get help from Hubspot Support on this? We have been experiencing the same problem

Hi @hsorense,

Yes, I contacted support. In case it helps, here’s what happened for us:

We are using CozyRoc to interface with the HubSpot API which makes API calls in batch sizes of 100. Our instance of CozyRoc doesn’t allow us to change the batch size, so in order to send and receive all of our contacts every day, we are making over 10k API calls a day. Support let me know that we may need to make fewer API calls because the error rate we’re seeing (three 502 Bad Gateway errors for every 10k calls) was below their standard rate of 500 errors.

This hasn’t been resolved yet as we’re investigating how to limit our API calls to reduce the frequency of these errors.

I also got a reply from HubSpot and we need to live with this and handle it. However, we only make a few 100 calls per day and this still happens a few times a week so it seems to just happen randomly when the servers are overloaded.

We’ve been seing this as well a few times per week. Contacted support now to see if they have a solution.