"You are trying to access 'appStoredEntities' too often"

Hello,

Our app (in production) is KO this morning due to the following error each time it loads:

{
  "message": "You are trying to access 'appStoredEntities' too often",
  "name": "FUNCTION_ERR",
  "stack": "Error: You are trying to access 'appStoredEntities' too often\n    at Function.forErrorCode (index.js:1179:16)\n    at assertNoErrors (index.js:1202:33)\n    at getResponseBody (index.js:1217:5)\n    at async GlobalStorage.query (index.js:1268:16)\n    at async GlobalStorage.list (index.js:1238:26)\n    at async Object.retrieveBookingForDays (index.js:46731:29)\n    at async Promise.all (index 2)\n    at async index.js:46402:25\n    at async resolve (index.js:1108:28)"
}

The app retrieve stored events in the Forge storage using the query method and iterate on the cursor to retrieve all the data. So my guess is this error is triggered for quota reason, like this one ?

Read operations | 50 | Maximum read operations per second per installation

Can anyone confirm this error message is linked to the quota restriction above ?

Thanks,
Clément

Yes, that’s a storage query quota error. If you are iterating on the cursor, you are probably hitting the 10 queries/second limit. I’m handling this in our apps by matching on the error message and trying the query again after a short delay.

2 Likes

Thanks for you answer, will do the same.

Could be great to have more filters in the query().where() API to avoid this case.

1 Like