"RateLimit Exceed" error crashing the social feed

Hello Amity team,
We utilize the Javascript Web UIKit, version 2.15.6 (2023-04-10).
Our app is built in Unity, and we embed the Amity social feed via UniWebView.
Our users are reporting that this error shows up after spending some time on the social feed page.

Can you advise what can be done?

Hello, we have rate limit regarding the api/function call - 10 calls/sec/user, to avoid this error, we recommend keeping track of the number of calls and making sure they stay within the limit.

Can you tell me how or what are the common cases where that happens?

For example, right now we don’t have hundreds of members posting or commenting or liking every minute.
And I would guess only a few are on the app at a time browsing the social feed posts.

Can you specify what type of API calls are causing that error? Is it any type of API calls from Amity API?

Would staying idle on the social feed for prolonged period of time reach the limit somehow?

In this case, whether you have 10 or 100 users doesn’t make a difference because the limit applies to each user individually.

This could happen if a specific endpoint is being called repeatedly. We recommend checking the implementation to eliminate any unnecessary calls or loops.

To stay within the application for the specified period of time should not result in this error.

Hello team,

After a few weeks of having this recurring issue to almost every user, we dug into it, and see that the API endpoint https://api.us.amity.co/api/v3/comments is being called 104 times when the feed is loaded.

We see this in the browser when diagnosing. (Image attached below)

I am assuming this call happens when the feed is loaded, after which, the individual posts load their comments. However, we have not touched this area of the code.
We’re using the Javascript Web UI Kit, described in the title post with the version, and this RateLimit Exceeded error has been happening from day 1.

Please review, and advise.

Could you please confirm whether you’re using the open-source UIKit or the packaged one? We’ve been unable to replicate this issue on our latest open-source UIKit version. Could you try updating to the latest version from this link below.

Opensource uikit: GitHub - AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource: Amity Social Cloud offers Chat and Social SDKs to streamline app development. Dive into our UI Kits and sample apps in our repositories to spark your creativity. To learn more, visit amity.co.

Sorry to ask, but what is the latest version #? Like what Release X.XX.X (#XX)?
And how would I update my forked version to that?

You can try updating your current UI Kit to the latest version, which is version 2.16. To check if the issue persists, please visit this link: https://docs.amity.co/amity-uikit/changelogs/changelog-2

If you’re considering a move to open source, the first step would be to migrate to the open-source version. You can find detailed guidance on this process here: https://docs.amity.co/amity-uikit/web/web-javascript-migration-guide

To update to the latest version of the UI Kit, you can retrieve the latest commit of the git submodule. For specific instructions, please refer to this section: https://docs.amity.co/amity-uikit/web/web-javascript-migration-guide#_uzs5qoweep2