Outgoing messages dropped Log

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
rewb0rn
Posts: 177
Joined: 26 Jan 2009, 12:54
Location: Berlin, Germany

Outgoing messages dropped Log

Postby rewb0rn » 28 Jul 2017, 12:27

Hello,

we want to investigate a problem where messages seem not to arrive at the client. By default, is there any log in the SFS2X when outgoing messages are dropped? If so, what do we have to look for?

Specifically we want to know if the maximum outgoing message queue size is reached, i.e. if the queue is full. The max value is currently at 20,000 and we want to understand if this is too low.

Thanks in advance,
Ruben
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Outgoing messages dropped Log

Postby Lapo » 28 Jul 2017, 13:42

Hi
rewb0rn wrote:we want to investigate a problem where messages seem not to arrive at the client. By default, is there any log in the SFS2X when outgoing messages are dropped? If so, what do we have to look for?

No by default there's no log related to dropped messages as it would potentially cause massive log file size.
You can turn on the DEBUG level in the logger and you'll be able to see warnings for specific sessions.

Specifically we want to know if the maximum outgoing message queue size is reached, i.e. if the queue is full. The max value is currently at 20,000 and we want to understand if this is too low.

This is highly unlikely. The Outgoing queue is used by the server when it knows it can send data to users.
There's a previous stage however, the User's queue where packets are parked if the network state of that client says that no more data can be received.

In other words, packet dropping happens because the User's queue is filled up. The outgoing queue instead only contains data that is certain to be delivered.

To be even more specific the queue logic is as follows:

- Server wants to send a packet to User1
- Server checks the network state for User1:
  • if OK -> put packet in Outgoing Queue,
  • if NOT OK -> put packet in User1's queue

When data is parked in the user queue it will stay there until the network state changes from "Can't read any data" to "I am available". At that point the oldest packet in the queue is moved into the Outgoing Q.

Hope it's clear.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
rewb0rn
Posts: 177
Joined: 26 Jan 2009, 12:54
Location: Berlin, Germany

Re: Outgoing messages dropped Log

Postby rewb0rn » 28 Jul 2017, 14:53

Hi Lapo,

thanks for your response and the additional information on the message queue. I am currently observing the dashboard and I can see that the size of the message queue peaks up to 3,000 messages, and it is not peak time, yet. In user peak times we are also running tournaments, where a lot of messages are sent simultaneously to all users. That's why we thought the message queue size might go over 20,000. What do you think?

Thanks,
Ruben
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Outgoing messages dropped Log

Postby Lapo » 28 Jul 2017, 14:57

Can you show me a screenshot of the outgoing queue in your server?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
rewb0rn
Posts: 177
Joined: 26 Jan 2009, 12:54
Location: Berlin, Germany

Re: Outgoing messages dropped Log

Postby rewb0rn » 28 Jul 2017, 15:02

Hi Lapo,

here is a screenshot from a moment ago. Some time earlier it was showing 3,000 something. There are peaks that regularly go over 2,000.

message-queue.png
(96.16 KiB) Not downloaded yet


Thanks,
Ruben
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Outgoing messages dropped Log

Postby Lapo » 28 Jul 2017, 15:57

Hi,
those spikes don't represent an issue because are very short lived, which is expected.

They wouldn't look good if instead of a spike they looked like an wide curve, meaning that those messages go into the queue and stay there for a long time.

Also check % of overall dropped packets (AdminTool > Dashboard). If the out value is within 5-8% it's pretty normal: it is expected that a minor portion of users will have slow connections and thus cause dropped packets.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 57 guests