Server closed the connection
#1

Sometimes when I and other players join my server we get message "Server closed the connection" and then sometimes we don't, it's like 30% chance server kicks player for no reason. In script I have kickmessage before kick and all kick functions delayed 500ms. I've debugged it so far that sometimes it kicks right when it comes to OnPlayerConnect, sometimes it's in the middle of the callback and sometimes when the callback ends.
In OnPlayerConnect I request from MySQL database user info and set them to arrays. Gamemode itself has been in development like ~4 years, which I've been refactoried time to time and is optimized pretty good. Takes up to ~400MHz stably CPU when ~50 players are playing and pretty much nothing if 0-5 players.
Server itself is newest SAMP server and other players including me have installed newest SAMP client.

The main question is, why server is kicking out players sometimes and sometimes not?

________________________________________
What I've tried:
- Set spawn info in OnPlayerConnect
- Set in server config "ackslimit" to 1000, 3000 or 6000
- Disabled and enabled "conncookies" in server config

________________________________________
Here is my server.cfg:

echo Executing Server Config...
lanmode 0
rcon_password RCONPASSWORD
maxplayers 150
port 7777
hostname Royal Roleplay
gamemode0 GAMEMODENAME 1
filterscripts maps
plugins mysql_static.so sscanf.so Whirlpool.so streamer.so
announce 0
query 1
weburl royal-rp.net
maxnpc 0
onfoot_rate 30
incar_rate 30
weapon_rate 30
stream_distance 200.0
stream_rate 1000
logtimeformat [%H:%M:%S]
language Estonian
password SERVERPASSWORD
lagcompmode 1
ackslimit 3000

Includes what I use:
#include <OPSP>
#include <streamer>
#include <zcmd>
#include <sscanf2>
#include <a_mysql>
#include <cuffs>
#include <getvehiclecolor>
#include <gpcwv>
#include <strlib>
#include <alltextures>
#include <zones>
#include <3dmenu> // Include 3D Menus (By SDraw)
Reply
#2

try reloading ban file on incoming connection callback.
Reply
#3

Gonna give it a shot, but I doubt it will help.
Because I don't use SAMP's ban function (therefore I don't even have such file "samp.ban"). I have my own ban system developed.
Reply
#4

Nope didn't help. Still getting randomly kicked.
Reply
#5

Where's the server_log, and why are you randomly changing the ACK limit?


Seriously, why are you randomly changing the ack limit?
Reply
#6

http://forum.sa-mp.com/showpost.php?...45&postcount=1
"- The default 'ackslimit' is raised from 1000 to 3000. Some servers had problems with players being erroneously kicked with an 'ackslimit' of 1000."

Tried different amounts to see if it has any influence on my case apparently not.

There isn't nothing unusual in server_log only that player disconnected with kick "reason" type on callback and that's all.
Reply
#7

If the log isn't showing the packet issue, then changing the ackslimit isn't what you need to do....


Now follow the guidelines for finding support, and POST YOUR SERVER_LOG...
Reply
#8

Just further to this thread, has the OP got major amounts of mapping in? Or have you been working on the object side of your script recently?


I think that when people have mad amounts of mapping in certain areas, that can throw you out. Like all close to where the player will be, so they enter the streamdistance then the server boots them, or their client crashes due to such a thing.
Reply
#9

There are in total ~2500 dynamic objects, where ~1000 of them are in vw/int 0 but those ain't all in the same place more like some amount of objects are here, some are there, other ~1500 dynamic objects are inside different interiors.
Reply
#10

Try removing those mappings for a test to see if that's causing it.

Should still post up the server.log startup, and a segment around where someone gets kicked. Just to see what's in the log.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)