Random trigger.js problems with cloud functions

More and more commonly I am getting the following error in production:

Note that its totally random. Sometimes, the app works fine and sometimes I need to try to submit something for 20-30 times before it finally succeeds.

PS. I found this post a while ago where similar stack trace is found: Synch historical failed due to validation failed

The solution back then was to update and restart the server which worked for me. However, now the problem still persists even after updating and restarting. (Latest moralis version is 0.0.369 and i was running 0.0.345)

Can someone from Moralis help, this stack traces are not giving me enough information.

Can you also add the server url?

https://fsnbzd9rxwph.usemoralis.com:2053/server

Hi, sorry for the late response.

I don’t se too much in logs either. I can see the parameters that were used, they seem to be the same every time when it fails. I noticed that is a try catch in that function, you could try without try catch, maybe you get the exact error in that case.

We still have the problem in production which is actually affecting all users. We didn’t deploy anything new and this problem started 2 months ago but for the last few weeks its appearing every time.

We literally need to press submit 20 times before the requests passes through. So if we didnt change anything I would assume that the error is on the moralis side.

(/moralis-server/lib/triggers.js:629:12) this file seems to be causing trouble. Is there any way to inspect it deeper?

I am actually trying to output the error in the catch block. However, there is no error message at all it seems.

I saw that line with catch, can you try to remove it for a time to see if I see more info about the error?

How fast you do those 20 submissions, what delay between them?

image

Just removed the catch block. No meaningful error output. Is it possible to check triggers.js file and see what is it doing?
When submitting every time, i am having a delay of maybe 2-3 seconds before submission (its a manual submission on the UI)

Ok, I can check the logs later. Can you add logger.info lines between all the lines to find out on that line it stops?

Ok, I managed to dig deeper, and I think the problem comes when I am calculating balances of a token.
Note I am getting token balances both on ETH Mainnet and Matic Mainnet chain and summing them up.

Then I get this error:

Seems like we are being throttled which a bit weird because we have a “production” plan.

That error looks like a rate limit error for a free account with 25 requests per second.

Where can I check on Moralis Dashboard what our plan is?
We have upgraded our plan already around 4 months ago, its strange if we have been downgraded.

It looks like the server is upgraded but the account is not a pro account. You can send an email to [email protected] to get more information about your account.

1 Like

Sent an email yesterday but still no response. Any idea on how long should i wait?

Hi @Shine check inbox now

Indeed you don’t have a Pro plan and higher API limit on the account, but you do have one $200 server in the account