APIs & Integrations

Tutuzin
Participant

Daily Rate Limit reached within hours

SOLVE

Hello there! 

 

We've been using Hubspot for a couple months now, integrating it wasn't actually that hard but it took some time. We ran some tests and everything seemed to be fine. After those tests we deployed our webpages and they were working fine for about 5 days when suddenly they wouldn't complete the requests anymore.

After digging into the code we found out that's because we've reached our 500k requests limits a day and it was only 9AM 03/13/2020 (We're in Brazil, so that would be GMT -3).

We are still looking into the cause of that problem but we're not being able to identify where the requests are comming from on our end, we are running through our servers' logs but everything seems to be normal.

Is there anyway that anyone could help us find where all the requests came from? We are looking for every possible cause of this, 500k requests in less than 9 hours past midnight is something our services would never be able to reach under normal circumstances...

 

This is the response we get when we try to send a request (this case is a contact creation/update).

 

error 429

  1.       status: "error" 
  2.       message: "You have reached your daily limit." 
  3.       errorType: "RATE_LIMIT" 
  4.       correlationId: "ff9f6701-c22b-4edf-b83a-68e4d3882970" 
  5.       groupName: "publicapi:hapikey-api-calls-daily:6598604" 
  6.       policyName: "DAILY" 
  7.        requestId: "70d57b2c48cbbc38c4bb6aea496bb113"

 

The limit seemed to be reached at around 8-9AM GMT -03:00.

 

Any help would be appreciated.

 

Thanks in advance!

 

Regards.

0 Upvotes
1 Accepted solution
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Daily Rate Limit reached within hours

SOLVE

Hey @Tutuzin ,

 

Giving your account's API usage a quick look, I can see that at around 8am ET today your API usage really exploded. It seems like most of the API requests are being made to the Contacts API, specifically the /contacts/v1/contact/email/:email/profile endpoint. Often, this is indicative of some malfuctioning retry logic that's running on an infinite loop.

 

Additionally, in the hours before this spike in traffic, it looks like there were a number of 429 rate limit errors related to the 100 per 10 seconds burst limit. I'd also recommend investigating your code to make sure that you're working within the burst limit, since 429 rate limit errors also count towards the per day limit.

View solution in original post

2 Replies 2
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Daily Rate Limit reached within hours

SOLVE

Hey @Tutuzin ,

 

Giving your account's API usage a quick look, I can see that at around 8am ET today your API usage really exploded. It seems like most of the API requests are being made to the Contacts API, specifically the /contacts/v1/contact/email/:email/profile endpoint. Often, this is indicative of some malfuctioning retry logic that's running on an infinite loop.

 

Additionally, in the hours before this spike in traffic, it looks like there were a number of 429 rate limit errors related to the 100 per 10 seconds burst limit. I'd also recommend investigating your code to make sure that you're working within the burst limit, since 429 rate limit errors also count towards the per day limit.

Tutuzin
Participant

Daily Rate Limit reached within hours

SOLVE

Thank you for your prompt reply.

 

We had that suspicion, we will give a look at our retry logic, our server had a slowdown in that interval of time and that must have been the cause of this spike.

 

We also will try to save the logs so that doesn't happen in the future and we keep a control.

 

Thanks again.