Client disconnection due to (possible) large packages

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

Moderators: Lapo, Bax

User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Client disconnection due to (possible) large packages

Postby mistermind » 20 Jan 2009, 14:30

I'm not sure if that is the actual problem, but I'm having a lot of client disconnections lately including myself from my game. After some tests I'm starting to think it has a relation to large amounts of information sent at once using smartfox.sendObject
Is there any parameter on the config file that could be causing these disconnections?
Last edited by mistermind on 20 Jan 2009, 19:41, edited 1 time in total.
SELECT * FROM users WHERE clue > 0
0 rows returned.
sstark
Posts: 77
Joined: 21 Nov 2008, 16:06

Postby sstark » 20 Jan 2009, 17:20

can you not change your extension to send part of the object, client requests the next part, extension sends, ect until the whole object is delivered? Would slow the transaction down a little, but might be worth it. Would also increase # of sql queries, however lower the data being produced by each query.
User avatar
mistermind
Posts: 131
Joined: 15 Sep 2007, 01:33
Contact:

Postby mistermind » 20 Jan 2009, 19:41

Hey there sstark, thanks for the answer.
After some tests I found out that doesn't seem to be a matter of how many or how "big" (where your idea would definitely come in handy) the packages are. I'm having a lot of client drops and my guess is, after noticing a pattern while after playing, that its happening when the object sent on sfs.sendObject is considerably larger then the regular packages (rather then ~1kb, it is around 4kb). I've already changed the parameter MaxMsgLen from 4k to 8k, but I'm almost positive that this is not the problem, since back then during some tests on sending a large amount of data, the server did fire warnings when the msg was over the limit.

The game is turn based btw (online card game), and the large package happens when (in my tests) the user tries to use a card that forces them to show their own hand to the opponent. In this specific case, the information is considerably big compared to other packages since it is a group containing all cards in their hand. I'm sure there is something on the config file I'm missing :D
SELECT * FROM users WHERE clue > 0

0 rows returned.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 21 Jan 2009, 06:59

Instead of using sendObject you could use a custom server side request using JSON or Raw-protocol. It will save bandwidth and as an additional bonus you'll be able to validate the data from server side.
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 56 guests