• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Problem with maxpacketspersecond

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
921
Location
Chile
Hello guys, i have the most annoying problem with this maxpacketspersecond, here is the explanation...

Once upon a time, i had 50 max packets per second, so players wont get disconnected when spamming keys or whatever, but that came with a high price, a problem that in otclient when ppl logged in, they only cna move one sqm and then they get disconnected, and in tibiaclient its a crash
7791a4eedd01d1d8d9a8a5caa7ea641c.png


so well i reduced the number to 25 instead of 50, but the problem continues and my players now are getting kicked very often, i have no idea how can i solve this D:

does anyone now what could i do?? :/!!!
 
Solution
In that case check timed events, like globalevents if something is executed after x seconds.
Or if you got an addEvent function in a creaturescript.

I would still try to use a clean source code and see if that fixes the issue.
Events, either try to make packets higher
i tried it but it only made this problem happen faster, within a few hours, with less packets it happens like every two days, you say maybe the bad script is in events? i have tfs original events.xml D:
tbh i have no idea wich one could be, they all seem legit
Code:
<?xml version="1.0" encoding="UTF-8"?>
<events>

    <!-- Creature methods -->
    <event class="Creature" method="onChangeOutfit" enabled="0" />
    <event class="Creature" method="onAreaCombat" enabled="0" />
    <event class="Creature" method="onTargetCombat" enabled="1" />

    <!-- Party methods -->
    <event class="Party" method="onJoin" enabled="0" />
    <event class="Party" method="onLeave" enabled="0" />
    <event class="Party" method="onDisband" enabled="0" />

    <!-- Player methods -->
    <event class="Player" method="onBrowseField" enabled="1" />
    <event class="Player" method="onLook" enabled="1" />
    <event class="Player" method="onLookInBattleList" enabled="1" />
    <event class="Player" method="onLookInTrade" enabled="1" />
    <event class="Player" method="onLookInShop" enabled="0" />
    <event class="Player" method="onMoveItem" enabled="1" />
    <event class="Player" method="onMoveCreature" enabled="0" />
    <event class="Player" method="onWrapItem" enabled="1" />
    <event class="Player" method="onTurn" enabled="1" />
    <event class="Player" method="onTradeRequest" enabled="1" />
    <event class="Player" method="onTradeAccept" enabled="0" />
    <event class="Player" method="onGainExperience" enabled="1" />
    <event class="Player" method="onLoseExperience" enabled="0" />
    <event class="Player" method="onGainSkillTries" enabled="1" />
    
    <!-- Monster methods -->
    <event class="Monster" method="onDropLoot" enabled="1" />
    
    
    
</events>
 
OTClient disconnecting is probably semi related to this:
Kicking bug · Issue #803 · edubart/otclient · GitHub

I believe they did a commit to restrict this somewhat in another issue (& pull request). So feel free to do the stress test again and record the actual package usage on your clients.

I'm curious to know if otclient still spams the server with tons of packages.
 
OTClient disconnecting is probably semi related to this:
Kicking bug · Issue #803 · edubart/otclient · GitHub

I believe they did a commit to restrict this somewhat in another issue (& pull request). So feel free to do the stress test again and record the actual package usage on your clients.

I'm curious to know if otclient still spams the server with tons of packages.
hello! my gm when it moves holding control+arrows it takes 3 seconds to get kicked out, with 25 packetspersecond
 
In that case check timed events, like globalevents if something is executed after x seconds.
Or if you got an addEvent function in a creaturescript.

I would still try to use a clean source code and see if that fixes the issue.
 
Solution
In that case check timed events, like globalevents if something is executed after x seconds.
Or if you got an addEvent function in a creaturescript.

I would still try to use a clean source code and see if that fixes the issue.
thanks man! the problem was in one of the events!! :D
 
Hey guys, i thought this was solved, my coder removed the autoloot event and put it into sources, that was the only event that didnt come with the default tfs 1.3, so it was the only suspicious, now i have maxpacketspersecond in 30, ppl get diconected all the time, and if i increase it, i have that horrible problem where no one can wal and they lost connection, any ideas anyone? :(
 
Someone is flooding your server with packets, usually bots are the one who are flooding server. That's normal if you increase max packets per second too high and your vps cant handle it.
 
Hey guys, i thought this was solved, my coder removed the autoloot event and put it into sources, that was the only event that didnt come with the default tfs 1.3, so it was the only suspicious, now i have maxpacketspersecond in 30, ppl get diconected all the time, and if i increase it, i have that horrible problem where no one can wal and they lost connection, any ideas anyone? :(

It seems to me to be a security issue... the server is receiving too much packages and in order to don't freeze or anything, it just kick the source of the packages.
 
exactly what i think guys, i cant raise it more than 30, and if i do i get this horrible error, also my otclient is encrypted, bots dont work there, even candybot or other bots for otclient, ofc this problems of disconecting dissapear if i increase the maxpacketspersecond, but when i do, i get the freezeing problem...
if i use 30 like now, it can last even 3 days without the problem but kicking very often, wich is very annoying to players
if i change to 50, it doesnt kick players but the freeze problem appears after a few hours

this is really driving me insane :(
 
exactly what i think guys, i cant raise it more than 30, and if i do i get this horrible error, also my otclient is encrypted, bots dont work there, even candybot or other bots for otclient, ofc this problems of disconecting dissapear if i increase the maxpacketspersecond, but when i do, i get the freezeing problem...
if i use 30 like now, it can last even 3 days without the problem but kicking very often, wich is very annoying to players
if i change to 50, it doesnt kick players but the freeze problem appears after a few hours

this is really driving me insane :(

I don't know how to help you. As for the bot, people can ping to your IP without the need of login in to your server. like a DDoS

But try this: Change the value to 35.

Does your server have cast systems? (just curious, might be something in there)

Does your server has MC option?

Does your server has exhausted system?

Is your CPU power enough?
 
Last edited:
I don't know how to help you. As for the bot, people can ping to your IP without the need of login in to your server. like a DDoS

But try this: Change the value to 35.

Does your server have cast systems? (just curious, might be something in there)

Does your server has MC option?

Does your server has exhausted system?

Is your CPU power enough?

hey, i used 35 before, same problem, doesnt have cast system, it does have mc option, it does have exhausted and these are the specs of my vps

2 vCore(s)
3.5 GHz
4 GB de RAM
60 GB SSD
3 TB de tráfico
 
when it freeze mysql consume more CPU or just TFS? and for how long the freeze last?
forever, its not technicaly a freeze, is a lot conection problem, they login, only can move one sqm and then nothing, until they get disconected, if they login with tibia client it crashes
 
That still doesn’t answer the question xd
We need more info to be able to help you
Also website load fine while the feeze happens?
 
Back
Top