Ghost users - Bad disconnections

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

mariana
Posts: 77
Joined: 26 Mar 2007, 11:15
Location: Buenos Aires, Argentina

Post by mariana »

Lapo:
is there an answer to this problem? or a workaround?

I'm almost ready to go online with my game except I get a "userLost" every so often in the extension trace and the user goes dead...is there a way to know WHY a user gets disconnected?

I thought it was my app, but I checked thoroughly and cannot find why users get lost, and I see I'm not the only one.

I'm using version 1.5, and the code is based on your sfTris game. Its been working ok (except for this very random userLost) for several months.

Thanks,

Mariana
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

From what you have explained in your other post:
for now, my game is served from a crummy laptop on my desk, for $0/month, but that is not too dependable.
you seem to be running the server from your home connection. The quality of the server connection, its capacity (bandwidth) and latency are very important for the stability of client connections.

Example: when the bandwidth saturates the server has to queue up messages until the pipes are free, but if it takes too long it will have disconnect those users whose queue is too big.

You can however configure those user queues and relative dropped-message threshold to allow more tolerance.
Lapo
--
gotoAndPlay()
...addicted to flash games
mariana
Posts: 77
Joined: 26 Mar 2007, 11:15
Location: Buenos Aires, Argentina

Post by mariana »

Lapo:
thanks for your suggestion, I'll work on it; however, at this time I have only two users, me and myself (testing my game), so I doubt the queues are a major problem yet.

I talked about it with Soupman (he's sent messages to this thread), and he told me the SFS extension needs to send every user a (chat?) message every x seconds (mSeconds?) for the user not to die. Is this the case? He says its worked fine for them for several weeks now. If so, I'll do it, but isn't it an awful waste of bandwidth?

Also, since my games are mostly turn-based, I am totally unfamiliar with all the timing, interval, synchro issues of MMOs.... do you have an example or a simple, prepackaged piece of code that will do this so that I don't have to code it from scratch? I'd greatly appreciate it...

One last thing: can you incorporate this into SFS in the next version?

Thanks,

Mariana
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

thanks for your suggestion, I'll work on it; however, at this time I have only two users, me and myself (testing my game), so I doubt the queues are a major problem yet.
Not really :D
I talked about it with Soupman (he's sent messages to this thread), and he told me the SFS extension needs to send every user a (chat?) message every x seconds (mSeconds?) for the user not to die. Is this the case?
The server disconnects has a customizable timeout for idle users. It's called MaxUserIdleTime, you can change it in your configuration. By default it is set to 300 seconds == 5 minutes.
Also, since my games are mostly turn-based, I am totally unfamiliar with all the timing, interval, synchro issues of MMOs.... do you have an example or a simple, prepackaged piece of code that will do this so that I don't have to code it from scratch? I'd greatly appreciate it...
Take a look at the SFSTris example, it's a turn based game and it comes in 3 versions:
1. client side logic
2. client side logic + spectators
3. server side logic + spectators

All the details are found in the docs plus you have the sources.

good luck
Lapo
--
gotoAndPlay()
...addicted to flash games
mariana
Posts: 77
Joined: 26 Mar 2007, 11:15
Location: Buenos Aires, Argentina

Post by mariana »

Lapo:
I still dont have answers to my questions:
I talked about it with Soupman (he's sent messages to this thread), and he told me the SFS extension needs to send every user a (chat?) message every x seconds (mSeconds?) for the user not to die. Is this the case?

He says its worked fine for them for several weeks now. If so, I'll do it, but isn't it an awful waste of bandwidth?

thanks,
Mariana
hga77
Posts: 25
Joined: 29 Apr 2008, 09:57

Post by hga77 »

Hi,

I've got exactly the same problem too. Users initially join the limbo room by default. From here users randomly get disconnected and sfs never fires the onConnectionLost event. The lost users are still visible on the admin and eventually get disconnected by the idle time.

Also from the limbo room, users can create a game room. They can also get disconnected while being in the game room, without an onConnectionLost event dispatch.

This is very hard to deal with and panic is starting to settle in since the launch date is only a few days away.

We have a version online of what we have so far.

Lapo would it be possible for you to have a look if I email/pm you?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Email sent
Lapo
--
gotoAndPlay()
...addicted to flash games
crayzero
Posts: 7
Joined: 03 Mar 2008, 07:33
Location: Philippines
Contact:

Post by crayzero »

Hello,

Same problem here. I'm using the latest SFS PRO. No disconnections when tested locally. But when I upload it to the server, users get disconnected in under a minute after login. At first I thought it was a server issue, as I was using a windows server 2000. Then I bought a server from Isointeractive and still, the disconnections remain.

I also noticed that when I login two users from home(laptop and a pc), no disconnections occurs. But when a new user from other location enters the game, he immediately get disconnected, then followed by my two users. Then she can't get back, because the server prompts that she's still in the game.

Any updates on this issue?

Thanks!

Darwin Jerome
ActionJetz
Post Reply