Raised This Month: $535 Target: $400
 133% 

Reduce 'SZ_GetSpace overflow on (Nick)'


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


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 19:38.


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