Hi, I have an issue "Unexplained" disconnect , after client login & active play in the game, some instance/NPC still got random disconnect - not frequent but it happened occasionally. If I check the log both in client & server the reason is UNKNOW
I'm implementing NPC using this link
https://smartfoxserver.com/blog/ways-of ... -game-p-2/
so the NPC manager (client) are in the same machine+session with the server , so how could it possibility got disconnect ?
the NPC are unique no duplicate id, the NPC that got disconnect are still in active playing/not idle. this is really wired.
any clue ?
Unexplained disconnect
Re: Unexplained disconnect
Hello
it sounds like a local connection issue of some sort because SFS2X is not reporting and "idle client" error, or manual disconnection.
Have you checked the client side for errors?
How many NPCs does this local app generate?
Thanks
it sounds like a local connection issue of some sort because SFS2X is not reporting and "idle client" error, or manual disconnection.
Have you checked the client side for errors?
How many NPCs does this local app generate?
Thanks
Re: Unexplained disconnect
Random disconnect after around 20 NPC become more often after 50 NPC but its not always
In Clients - CONNECTION_LOST event we got UNKNOWN reason
All NPC program in try-catch block so if whatever error did occur we should know
Both the NPC Manager process and the Server process in the same machine+windows session so network failure should not the issue yes , since NPC Manager connect to the server using localhost
In Clients - CONNECTION_LOST event we got UNKNOWN reason
All NPC program in try-catch block so if whatever error did occur we should know
Both the NPC Manager process and the Server process in the same machine+windows session so network failure should not the issue yes , since NPC Manager connect to the server using localhost
Code: Select all
cfg.setHost("localhost");
cfg.setPort(9933);
cfg.setZone("defaultZone");
Re: Unexplained disconnect
Yes, I agree in the localhost it is very strange.
Also the number of connections (20-50) is very low and should be of no concern.
Unfortunately I can't provide further help without more data. If you are familiar with Wireshark you could capture the traffic between NPCs and the server. It may provide a bit of extra info on the disconnection problem.
Cheers
Also the number of connections (20-50) is very low and should be of no concern.
Unfortunately I can't provide further help without more data. If you are familiar with Wireshark you could capture the traffic between NPCs and the server. It may provide a bit of extra info on the disconnection problem.
Cheers
Re: Unexplained disconnect
wireshark, ok we'll do that
thanks
thanks
Re: Unexplained disconnect
we found another disconnect issue, in 1 room have 3 bot player and 1 real player.
if the real player leave room or F5 (refresh browser), all others 3 bot player got session remove and disconnect, the reason in bot client is MANUAL
we try if all 4 real player using browser client this issue do not occur and the game it self already in production around half year no such issue, what the problem here, what exactly MANUAL means in client connection_lost reason ?
EDIT:
currently we using the second method for our BOT since at production we will separate the game server and bot in different machine/computer
https://smartfoxserver.com/blog/ways-of ... -game-p-2/
if we change it using the first method does the disconnect issue will go away ?
https://smartfoxserver.com/blog/ways-of ... -game-p-1/
if the real player leave room or F5 (refresh browser), all others 3 bot player got session remove and disconnect, the reason in bot client is MANUAL
we try if all 4 real player using browser client this issue do not occur and the game it self already in production around half year no such issue, what the problem here, what exactly MANUAL means in client connection_lost reason ?
EDIT:
currently we using the second method for our BOT since at production we will separate the game server and bot in different machine/computer
https://smartfoxserver.com/blog/ways-of ... -game-p-2/
if we change it using the first method does the disconnect issue will go away ?
https://smartfoxserver.com/blog/ways-of ... -game-p-1/
Re: Unexplained disconnect
Manual disconnection means that the client called the disconnect() method from their side.
The problem you have described where multiple automated clients receive a manual disconnection seems unlikely. There is only one way to get a disconnection reason==MANUAL, and that is if your client actually initiates the disconnection.
In any case, if the problem is reproducible 100% of the times, please send us a proof of concept so we can reproduce it on our side.
You can use our support@... email box to send the repro-case.
Thanks
The problem you have described where multiple automated clients receive a manual disconnection seems unlikely. There is only one way to get a disconnection reason==MANUAL, and that is if your client actually initiates the disconnection.
In any case, if the problem is reproducible 100% of the times, please send us a proof of concept so we can reproduce it on our side.
You can use our support@... email box to send the repro-case.
Thanks
Re: Unexplained disconnect
"There is only one way to get a disconnection reason==MANUAL, and that is if your client actually initiates the disconnection."
thank you Lapo for you clarification narrowing the possible bugs. We will check the code in bot client side.
thank you Lapo for you clarification narrowing the possible bugs. We will check the code in bot client side.
Re: Unexplained disconnect
ok found the culprit, in room_exit events have sfs.disconnect, so if any player exit the room all bot command got disconnect
thanks Lapo
thanks Lapo
Re: Unexplained disconnect
Great, thanks for the update
Who is online
Users browsing this forum: Baidu [Spider] and 92 guests