Thread Tools Display Modes
10/31/15, 05:19 AM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Excessive Message Spam

I am currently playing around with guild member notes and as expected keep getting kicked for message spam when I update them too often in a short time.
Now I am wondering if there is any information on how often we can call certain functions before we get kicked in order to prevent calling it too fast.
The EVENT_SPAM_WARNING does not seem to fire in this case and there is no function like GetTradingHouseCooldownRemaining to tell us how long we should wait between calls to SetGuildMemberNote. There is not even any info which functions do have a message limit.

After some trial and error I arrived at waiting 10 seconds after EVENT_GUILD_MEMBER_NOTE_CHANGED is received before running the next SetGuildMemberNote, but this is all pretty fuzzy and I wonder if it can be faster than that. Maybe it would be better to make x calls in y seconds and then wait z second before doing the next batch?

I am really curious how this is handled internally.
Is it a simple token-bucket algorithm? Is it something else?
It would also be good to know if the limit is independent for each function, or if there is a global counter. Right now I only tested it when doing nothing besides calling SetGuildMemberNote, but ultimately I would like to run this during normal gameplay and it would be bad if I get kicked because calls to other functions interfered with it.

Once this is all cleared up I'd like to gather all there is to know about message rate limits on a wiki page.
  Reply With Quote
11/02/15, 09:13 AM   #2
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
It is per message to the server and implemented as a leaky bucket so it can tolerate some burst.
  Reply With Quote
11/03/15, 09:19 AM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Thanks for you reply. It answers some questions.
Still have to figure out how often I can call it safely without getting kicked.
  Reply With Quote
07/22/18, 05:08 AM   #4
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
Do you know the rate limit ?
  Reply With Quote
07/22/18, 07:07 AM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
There are different limits for different API functions from what I have found out. Changing guild notes etc has a much lower limit than sending map pings for example.

As for the map pings, I did some extensive tests on the PTS and found that the limit is 2 calls per second over a prolonged time. But that is a gross oversimplification. Actually it is a bit more complicated. In the latest version of LibMapPings I added a leaky bucket implementation which drops any pings that would go over the limit and get you kicked.

But that implementation also doesn't account for the burst that Chip mentioned and there is also a different limit for in and out of combat:



As long as you stay below the curve, you won't get kicked and in the second image you can see that 2 pings per second is infinitely sustainable.

In general it would be great if ZOS could implement some functionality to prevent getting kicked from the game on the client side. For example a function to get the cooldown for the different functions and also warning events that a call has been dropped if an addon sent too many calls, instead of just dropping the player to the login screen.
  Reply With Quote
07/22/18, 03:44 PM   #6
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
Thanks.

Lua Code:
  1. /script for i = 1,24 do SlotSkillAbilityInSlot(4, 4, 2, 3) end

I get a warning arround ~20 or 30.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Excessive Message Spam

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off