It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trello Rate Limit

Hi all,

So I am using this wrapper (https://github.com/cdaguerre/php-trello-api) to automate Trello cards on an internal platform. One page lists actions and triggers that need to take place or Trello cards to be copied when the actions take place - mostly relating to staff on-boarding and departure ... On listing the page of actions and triggers, I get the following in the error log ...

[2019-06-03 12:33:53] request.CRITICAL: Uncaught PHP Exception Trello\Exception\RuntimeException: "Rate limit exceeded" at /var/www/html/vendor/cdaguerre/php-trello-api/lib/Trello/HttpClient/HttpClient.php line 152 {"exception":"[object] (Trello\\Exception\\RuntimeException(code: 429): Rate limit exceeded at /var/www/html/vendor/cdaguerre/php-trello-api/lib/Trello/HttpClient/HttpClient.php:152, Trello\\Exception\\RuntimeException(code: 429): Rate limit exceeded at /var/www/html/vendor/cdaguerre/php-trello-api/lib/Trello/HttpClient/Listener/ErrorListener.php:62)"} []

All that we do is a refresh of the page but the weird thing is that the list displays fine at times. But gives that error in the log at other times.

Any advice to debug all the calls that are happening?

Thank you in advance

1 answer

1 accepted

0 votes
Answer accepted
matt Atlassian Team Jun 10, 2019

Hi Yatish,

 

It sounds like you are running into Trello API rate limits. You can find a lot more detail about our rate limits here https://developers.trello.com/docs/rate-limits but in short a single token or application key is limited to making a certain number of requests in a time window. In the case of a single token which would be my initial guess for your case, that limit is generally 100 requests in a 10 second window.

In general the way to handle these kinds of errors is two-fold. We recommend throttling your requests so that you avoid exceeding the limit in the first place. We also recommend that if you do run into the limit, you can implement a retry system which can re-make the requests that failed after some back off (i.e. waiting 10 seconds).

Hi Matthew,

Thanks for the answer and tips.

Yes, I am aware that it is due to the rate limit that is being hit.  Just not sure how and why it is being hit, basically trying to get to the root of the rate limit :) ... I tried to create a webhook with the same token on the organization as the model Object to see the calls made to the API to monitor it. And I get no POST returns made to the webhook callback URL. 

Is there another way to monitor or find out how and why the rate limit is being hit?

Side question - Can I create a webhook on the organization object level to see all activity done across all boards and members within the Team? If so, does that affect the rate limit too.

Thank you

Yatish

matt Atlassian Team Jun 12, 2019

If you can send us the API key that you are using for your requests to the Trello API in an email to platform [at] trello.com we can help take a look into what requests your app is making and why it is being rate limited. Setting up webhooks, and receiving events from webhooks that you setup shouldn't have any impact on your rate limits, but unfortunately at the moment you can't simply setup a webhook on an organization and get all the events across all board in the organization. Instead you'd have to setup a webhook per board in the team for that.

 

- Matt

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

Develop a new Habit during Lockdown

If you had to thrive a new habit during a lockdown, what would it be? Trello

1,597 views 14 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you