TheSil / base_enhanced

sil's base_enhanced server mod
3 stars 4 forks source link

New players can't connect to server during /pause #72

Closed deathsythe47 closed 9 years ago

deathsythe47 commented 9 years ago

Example: Player lags out of game Everyone /pauses so he can come back Player attempts to connect to server and gets stuck at "awaiting snapshot" Players ingame see "Padawan server command overflow"

TheSil commented 9 years ago

Yes this is a known issue, problem is fundamentally in how pause works. It constantly increments all timers game have stored (well apparently not all of them since we all still discovering some timers that do not increment...), and some of these timers affect data that are sent to client. This data are then transmitted and spam clients. Those clients that are connected to the server can handle these easily, they just process them and server can discard them. However with connecting clients, server has to buffer these commands until they actually finish connecting, and server simply does not have capacity to hold that many commands, so they overflow.

Few quick ideas:

dpadgett commented 9 years ago

you should be able to just not send the updates if a player's not fully connected yet other idea: don't send update if player has > X (10?) unacked server commands sent

On Sat, Aug 22, 2015 at 3:12 AM TheSil notifications@github.com wrote:

Yes this is a known issue, problem is fundamentally in how pause works. It constantly increments all timers game have stored (well apparently not all of them since we all still discovering some timers that do not increment...), and some of these timers affect data that are sent to client. This data are then transmitted and spam clients. Those clients that are connected to the server can handle these easily, they just process them and server can discard them. However with connecting clients, server has to buffer these commands until they actually finish connecting, and server simply does not have capacity to hold that many commands, so they overflow.

Few quick ideas:

  • increasing command buffers (probably will be engine related but i havent looked at it)
  • trying to find what commands cause this and try to do something with them (do not send them on each frame?)

— Reply to this email directly or view it on GitHub https://github.com/TheSil/base_enhanced/issues/72#issuecomment-133674931 .

TheSil commented 9 years ago

Well i think the actual problem is that those commands are buffered and overflow on server side, no client side....

dpadgett commented 9 years ago

yeah that is what i meant. do not even attempt to send to those clients that are not fully connected, in gamecode.

On Sun, Aug 23, 2015 at 1:01 AM TheSil notifications@github.com wrote:

Well i think the actual problem is that those commands are buffered and overflow on server side, no client side....

— Reply to this email directly or view it on GitHub https://github.com/TheSil/base_enhanced/issues/72#issuecomment-133798481 .

TheSil commented 9 years ago

I think the server engine actually sends those, you change config string, engine sends it to all clients.

Anyway i have found out that one recent change added large amount of configstring settings, so i reduced it to be done on 1 Hz rate, now it should be reasonable long time for connecting before command buffer overflows.