Open KiLaF opened 7 months ago
Its very hard to understand what you're saying. Can you provide example code of how you're hitting the state packet overflow
Its very hard to understand what you're saying. Can you provide example code of how you're hitting the state packet overflow
I wanted to use it for a contact between client & server instead of TriggerServerEvent
Reading your explanation I understand that when you enable rate limiting on state bags, you quickly hit the rate limiting limits, correct?
"Enable rate limiting" There is rate limiting?
There is rate limiting?
Yep, I'll leave that to @nihonium-cfx and @AvarianKnight, not sure if they already made public documentation on it
There's where a few rate limiters for state bags, they use the same logic as client->server net events.
Each rate limiter can be adjusted via ConVar if you're hitting the rate limits, though these limits are extremely high for defaults and if you're hitting them then I highly recommend you adjust how you're sending them.
These limiters are needed to prevent the possibility of memory exhaustion or to prevent a client from crashing the server you can find more information in https://github.com/citizenfx/fivem/issues/2361
If a client is detected as flooding then they will be dropped from the server so that they don't cause any network issues.
If a client is detected to be sending too large packets then the server will automatically drop them to prevent them from overloading the network thread and to prevent the possibility of memory exhaustion.
For reference these are the values we run on our server
# the client rarely sets state bags so this value should be extremely low
set rateLimiter_stateBag_rate 20
set rateLimiter_stateBag_burst 30
# setting this to 0 will cause a server assert
set rateLimiter_stateBagFlood_rate 1
set rateLimiter_stateBagFlood_burst 1
# clients should never sync large state to the server
# set rateLimiter_stateBagSize_rate 16000
# set rateLimiter_stateBagSize_burst 18000
What happened?
so when their is a rate limit that is putten on state bags that stop makes you barelly can use it when their is multiple players doing so in the same time. I tried to use state bag to make a contact with the serveur but when im the only connected it works but when multiple players it kicks them of overflow
Expected result
Reduce ratelimit or fix
Reproduction steps
i explained everything up
Importancy
Security issue
Area(s)
FiveM
Specific version(s)
FiveM
Additional information
No response