Execution time limit exceeded

I am running distinct query on one collection, to get distinct id.
after getting distinct id’s I am looping over on that id’s, and updating some field with
serverless function in Realm.

But While Updating I am getting Following error.

ran at 1657632180167
execution time limit exceeded

Can any Please help me whats goin here.

Hi Suraj,

It’s probable that you’re exceeding the time constraint which is imposed on Functions.


1 Like

Hi Mansoor Thanks for Reply.

I know that, I am exceeding time constraint, but unable to find out how to increse the function time out. And also I tried “maxTimeMS()” function on find, update, aggregation queries.

I really very confuse. I have to loop over on 1K-10K off data.

You cannot increase the function time constraint which is currently 120 seconds, this is globally set.

If you’re able to raise a support ticket we can take a look at the queries and may be able to suggest indexes that could help. Otherwise look into the following:

1 Like