vazco / meteor-universe-i18n

Internationalization package for Meteor with React integration.
https://atmospherejs.com/universe/i18n
MIT License
123 stars 32 forks source link

Excessive calling of universe.i18n.setServerLocaleForConnection #187

Closed evolross closed 8 months ago

evolross commented 8 months ago

Meteor: 2.7.2 meteor-universe-i18n: 2.0.0

In our production meteor app we're noticing a massive amount of calls to the method universe.i18n.setServerLocaleForConnection in MontiAPM. So much so that it trigger tons of You've sent too many requests too quickly. errors in our default configuration of DDPRateLimiter.

MontiAPM Methods

MethodOvercalling

MontiAPM Errors

Errors

I've scanned our code and we don't ever call universe.i18n.setServerLocaleForConnection so it seems to be the package calling it.

I've went over our code, added console logs, and don't see anything overfiring or going into a reactive infinite loop. Our implementation of meteore-universe-i18n is described in this Meteor forum thread.

We load this the same way on two different production apps and it's happening on both. Strangely, it seems to come and go. As you can see in the last part of the hour, the calls to this method and the errors reduce significantly. It looks like it zeros out, but it just goes down to a few hundred calls versus charting up to 20K and 30K.

And it's not due to a significant amount of traffic. During the entire hour there were about 115 total sessions, give or take, and not fluctuating much.

evolross commented 8 months ago

Looks like this is a duplicate of #127. Closing this. Will comment there.