Raised This Month: $9 Target: $400
 2% 

Reduce 'SZ_GetSpace overflow on (Nick)'


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 08-30-2021 , 07:39   Reduce 'SZ_GetSpace overflow on (Nick)'
Reply With Quote #1

This error appears at server console when player reliable channel is overflowed.

I have noticed that this happens in two different situations:
  1. Player loses connection or crashed and all data packets start to accumulate
  2. Server is sending too much data for him

That can't be fixed at all, because depends on player network.
But we can reduce the overflow on player.

First step. Configure your 'sv_timeout' cvar.
Code:
sv_timeout - Controls how long before the server disconnects a client that has stopped responding.
This isn't applied when player is AFK, only when client game doesn't receive any data packet.

Default value is 60 seconds, sooo many seconds.
I'm using right now 20 seconds and all works fine. But this can be reduced to 15 or 10 seconds.
Be careful about players that lose connection for some seconds.

Second step. Check your plugins
Plugins sending too many reliable messages like show_hudmessage, ShowSyncHud, show_dhudmessage, client_print, etc.
Try to reduce the calls.

I will expose one EXAMPLE.

In my case, I had problems with one plugin doing like this:
PHP Code:
new g_MsgSync

public plugin_init()
{
    
register_event("Damage""event_damage""b""2!0""3=0""4!0")
    
g_MsgSync CreateHudSyncObj()
}

public 
event_damage(id)
{
    static 
attackerattacker get_user_attacker(id)
    static 
damagedamage read_data(2)

    
set_hudmessage(255000.450.5020.12.00.10.1, -1)
    
ShowSyncHudMsg(idg_MsgSync"%i"damage)

Imagine: one player with 30k health and 20 players shooting him.
Every player doing damage is a new HUD shown. Many many calls.

This can produce player that receives damage being overflowed.

How to fix? Well, maybe trying to reduce the HUD calls.
Idea: Only show a new HUD if damage is higher or X seconds passed:
PHP Code:
new g_MsgSync
new Float:g_fLastDmgShowed[33]
new 
g_iLastDamageVic[33]

public 
plugin_init()
{
    
register_event("Damage""event_damage""b""2!0""3=0""4!0")
    
g_MsgSync CreateHudSyncObj()
}

public 
event_damage(id)
{
    static 
attackerattacker get_user_attacker(id)
    static 
damagedamage read_data(2)

    
// To prevent sending too much HUDs to victims
    
static Float:gametimegametime get_gametime()
    if (
damage g_iLastDamageVic[id] || gametime g_fLastDmgShowed[id] >= 1.0)
    {
        
set_hudmessage(255000.450.5020.12.00.10.1, -1)
        
ShowSyncHudMsg(idg_MsgSync"%i"damage)

        
g_fLastDmgShowed[id] = gametime
        g_iLastDamageVic
[id] = damage
    
}


Last edited by baneado; 08-30-2021 at 08:05.
baneado is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 09-05-2021 , 23:26   Re: Reduce 'SZ_GetSpace overflow on (Nick)'
Reply With Quote #2

Usually, my players got overflowed after the New Round started (right at the Freeze Time after the previous round ended)
I also used the "Damage Display" whenever player deal damage but they was never got overflowed.
I don't think Hud is the main offender here.

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage_Post"1);
    
RegisterHam(Ham_TakeDamage"func_breakable""fw_TakeDamage_Post"1);
}

public 
fw_TakeDamage_Post(EntinflictorattackerFloat:damagedamagebits)
{
    if(!
is_user_alive(attacker))
        return 

    
set_hudmessage(255000.450.5020.12.00.10.11//Sorry, borrow this
    
show_hudmessage(attacker"%i"floatround(damage));

I usually force Damage Display to 1 channel (it is 1 in my example) so it will always replace to the same channel, preventing other hud from flashing because it got overrided by damage hud.

Edit: oh wait, that was "Reliable channel overflow" which is another problem. But still, I used damage display but there ain't any overflow happened.
__________________
My plugin:

Last edited by Celena Luna; 09-05-2021 at 23:42.
Celena Luna is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 09-07-2021 , 12:20   Re: Reduce 'SZ_GetSpace overflow on (Nick)'
Reply With Quote #3

It's not the same attacker than victim.

One victim can have a lot of attackers at the same time.
Read the example I've posted:
Code:
Imagine: one player with 30k health and 20 players shooting him.
Every player doing damage is a new HUD shown. Many many calls.
Anyways, I recommend you to 'optimize' that hud too

Last edited by baneado; 09-07-2021 at 12:24.
baneado is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 09-07-2021 , 23:38   Re: Reduce 'SZ_GetSpace overflow on (Nick)'
Reply With Quote #4

I guess showing damage to victim could cause this error since it a lot more than only show to attacker...

But still, it is only one offender for this error.

P/S: Yeah, I could optimized that. But it doesn't cause any issue (to me at least) so I didn't mind keep it that way
__________________
My plugin:

Last edited by Celena Luna; 09-07-2021 at 23:41.
Celena Luna is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 09-08-2021 , 19:23   Re: Reduce 'SZ_GetSpace overflow on (Nick)'
Reply With Quote #5

Quote:
Originally Posted by Celena Luna View Post
I guess showing damage to victim could cause this error since it a lot more than only show to attacker...

But still, it is only one offender for this error.

P/S: Yeah, I could optimized that. But it doesn't cause any issue (to me at least) so I didn't mind keep it that way
See your logs searching 'overflow'

For me it wasn't causing any error, but for other players yes.
Depends on player's network

Last edited by baneado; 09-08-2021 at 19:24.
baneado is offline
Reply


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

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

Forum Jump


All times are GMT -4. The time now is 07:09.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode