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


Messages In This Thread
RANDOMLY: Server closed the connection - by Caupo - 06.08.2016, 13:00
Re: Server closed the connection - by Logic_ - 06.08.2016, 13:15
Re: Server closed the connection - by Caupo - 06.08.2016, 13:23
Re: Server closed the connection - by Caupo - 08.08.2016, 00:10
Re: Server closed the connection - by Sew_Sumi - 08.08.2016, 00:22
Re: Server closed the connection - by Caupo - 08.08.2016, 00:35
Re: Server closed the connection - by Sew_Sumi - 08.08.2016, 01:24
Re: Server closed the connection - by Sew_Sumi - 08.08.2016, 01:44
Re: Server closed the connection - by Caupo - 08.08.2016, 11:54
Re: Server closed the connection - by Sew_Sumi - 08.08.2016, 17:38

Forum Jump:


Users browsing this thread: 3 Guest(s)