Complexity query exhausted

Hi Folks,

We are trying to execute API queries in our cron, it is working fine for short queries but it breaks when we try to execute it in sequence queue and throw complexity exhausted query error. We have tried to solve it but no luck.

Please help us if you have any solution.

Thank you in advance!

Hi @Ept_dev
There are two ways to solve this problem:

  1. monitor your complexity threshold and slow down (or wait) as soon as you are reaching the limit;
  2. simplify your query (e.g. no nested objects)

Hi @rob

I’m using query mutation with curl in cron job. There are only simple queries no nested queries but, all they are executing in bulk. Like item creation and change item value queries are executing one by one in loop.

One more thing, I have checked documentation and found that All queries made through an API token belonging to a specific user must not exceed 10,000,000 points per minute (1M for trial and free accounts) So what is query point limit for subscription/paid account?

I have tried some query changes but still facing same. Can you help me about this?

Thank you in advance!

As said, just monitor the complexity.
For example, if you add the complexity field to your mutations you’ll be able to check your current level (that will be rest every minute).

mutation {
  complexity {
    query
    before
    after
  }
  create_item(board_id:12345, item_name:"test item") {
    id
  }
}

Just return a HTTP code different from 200, for example 429 Too many requests, to tell monday to repeat the request after 30 secs.

For bulk operations, there’s no other solution.

Hi @rob

Our application creates boards, groups, columns, and items at runtime. For this, it’s required to send multiple requests, and it stops after executing 25+ requests and we have more than 200 requests.

If there is no way to handle this API limitation then it means we can not use Monday API for applications that execute bulk queries Or sequences in queue.

I couldn’t find any solution for this, it is very disappointing.

Thanks for your support and help.