Accumulation of message to send
Posted: 10 Nov 2010, 15:37
Hey Lapo.
I have developped a custom extension for SmartFox 1.6.6. Everything seems to be running very smoothly, but for some reason, after an extended period of time, Smartfox seems to queue up messages and send them in batch. One example is that if I do 2 actions at a very different time (say talk, wait a few seconds, then drop an item), the clients will receive the response after a while, but all at the same time. At first, I thought it was because the server was under stress, but after taking out the server from circulation, waiting for the client count to drop, and running YourKit Java profiler on it, nothing comes up, but the behaviour is still present. I've added a custom command to write in the log. When I do talk, wait a second, send custom command to log something, wait a few more seconds, then drop an item, I receive both talk and drop item at the same time, but the custom command is clearly received and executed almost at the same time I sent it.
That info leads me to belive that Smartfox is somehow accumulating message to send to the client, and then sending them after a while in batch, but the reception/execution are done almost right away.
That behaviour does not happen at first though, we need to get a good lot of people on the server, but once that behaviour appears, even with a single client connected, it takes a while.
Is there anything I missed in the configuration that could be causing such a behaviour?
Here's a snippet of our configuration :
<ClientMessagQueue>
<QueueSize>50</QueueSize>
<MaxAllowedDroppedPackets>1</MaxAllowedDroppedPackets>
</ClientMessagQueue>
<OutQueueThreads>1</OutQueueThreads>
<ExtHandlerThreads>1</ExtHandlerThreads>
<MaxWriterQueue>100</MaxWriterQueue>
I have developped a custom extension for SmartFox 1.6.6. Everything seems to be running very smoothly, but for some reason, after an extended period of time, Smartfox seems to queue up messages and send them in batch. One example is that if I do 2 actions at a very different time (say talk, wait a few seconds, then drop an item), the clients will receive the response after a while, but all at the same time. At first, I thought it was because the server was under stress, but after taking out the server from circulation, waiting for the client count to drop, and running YourKit Java profiler on it, nothing comes up, but the behaviour is still present. I've added a custom command to write in the log. When I do talk, wait a second, send custom command to log something, wait a few more seconds, then drop an item, I receive both talk and drop item at the same time, but the custom command is clearly received and executed almost at the same time I sent it.
That info leads me to belive that Smartfox is somehow accumulating message to send to the client, and then sending them after a while in batch, but the reception/execution are done almost right away.
That behaviour does not happen at first though, we need to get a good lot of people on the server, but once that behaviour appears, even with a single client connected, it takes a while.
Is there anything I missed in the configuration that could be causing such a behaviour?
Here's a snippet of our configuration :
<ClientMessagQueue>
<QueueSize>50</QueueSize>
<MaxAllowedDroppedPackets>1</MaxAllowedDroppedPackets>
</ClientMessagQueue>
<OutQueueThreads>1</OutQueueThreads>
<ExtHandlerThreads>1</ExtHandlerThreads>
<MaxWriterQueue>100</MaxWriterQueue>