Massive disconnect users caused by a socket error

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
arodrigo
Posts: 24
Joined: 22 Jul 2011, 10:03
Location: Spain
Contact:

Massive disconnect users caused by a socket error

Postby arodrigo » 24 Nov 2011, 18:02

Hello,

I have a game with about 800 CCU. Everything works fine (cpu, memory, mysql, ... <10%) but occasionally clients start to receive SFSEvent.SOCKET_ERROR disconecting 100 or more users but not all off them. Not all the users receives this event and when it happens the game continues working normally.

Some of the errors that appear in the SFS:

Code: Select all

24 Nov 2011 18:37:30,745 WARN  [com.smartfoxserver.v2.controllers.SystemController-1] v2.controllers.SystemController     -
com.smartfoxserver.bitswarm.exceptions.SessionReconnectionException: Session Reconnection failure. The passed Session is not managed by the ReconnectionManager: java.nio.channels.SocketChannel[connected local=/***********:9933 remote=/************:52184]
        com.smartfoxserver.bitswarm.sessions.DefaultReconnectionManager.reconnectSession(DefaultReconnectionManager.java:134)
        com.smartfoxserver.bitswarm.sessions.DefaultSessionManager.reconnectSession(DefaultSessionManager.java:376)
        com.smartfoxserver.v2.controllers.system.Handshake.execute(Handshake.java:68)
        com.smartfoxserver.v2.controllers.SystemController.processRequest(SystemController.java:129)
        com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
        java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        java.lang.Thread.run(Unknown Source)

24 Nov 2011 18:37:39,853 WARN  [com.smartfoxserver.v2.controllers.SystemController-7] v2.controllers.SystemController     -
com.smartfoxserver.bitswarm.exceptions.SessionReconnectionException: Session Reconnection failure. The passed Session is not managed by the ReconnectionManager: java.nio.channels.SocketChannel[connected local=/**********:9933 remote=/*********:49397]
        com.smartfoxserver.bitswarm.sessions.DefaultReconnectionManager.reconnectSession(DefaultReconnectionManager.java:134)
        com.smartfoxserver.bitswarm.sessions.DefaultSessionManager.reconnectSession(DefaultSessionManager.java:376)
        com.smartfoxserver.v2.controllers.system.Handshake.execute(Handshake.java:68)
        com.smartfoxserver.v2.controllers.SystemController.processRequest(SystemController.java:129)
        com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
        java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        java.lang.Thread.run(Unknown Source)

24 Nov 2011 18:37:53,344 WARN  [SocketWriter-1] bitswarm.core.SocketWriter     - Error during write. Session: { Id: 807, Type: DEFAULT, Logged: Yes, IP: ******************:49336 }
24 Nov 2011 18:37:53,345 WARN  [SocketWriter-1] bitswarm.core.SocketWriter     -
java.lang.NullPointerException
        com.smartfoxserver.bitswarm.core.SocketWriter.processRegularSession(SocketWriter.java:262)
        com.smartfoxserver.bitswarm.core.SocketWriter.processSessionQueue(SocketWriter.java:197)
        com.smartfoxserver.bitswarm.core.SocketWriter.run(SocketWriter.java:173)
        java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        java.lang.Thread.run(Unknown Source)



the server.xml:

Code: Select all

<serverSettings>
  <socketAddresses>
  </socketAddresses>
  <ipFilter>
    <addressBlackList>
    </addressBlackList>
    <addressWhiteList>
    </addressWhiteList>
    <maxConnectionsPerAddress>9999999</maxConnectionsPerAddress>
  </ipFilter>
  <flashCrossdomainPolicy>
    <useMasterSocketPolicy>true</useMasterSocketPolicy>
    <policyXmlFile>crossdomain.xml</policyXmlFile>
  </flashCrossdomainPolicy>
  <systemControllerThreadPoolSize>12</systemControllerThreadPoolSize>
  <extensionControllerThreadPoolSize>12</extensionControllerThreadPoolSize>
  <systemControllerRequestQueueSize>35000</systemControllerRequestQueueSize>
  <extensionControllerRequestQueueSize>35000</extensionControllerRequestQueueSize>
  <schedulerThreadPoolSize>12</schedulerThreadPoolSize>
  <protocolCompressionThreshold>1024</protocolCompressionThreshold>
  <protocolMode>BINARY</protocolMode>
  <remoteAdmin>
    <administrators>
      <adminUser>
      </adminUser>
    </administrators>
    <allowedRemoteAddresses>
    </allowedRemoteAddresses>
    <adminTcpPort>9933</adminTcpPort>
  </remoteAdmin>
  <bannedUserManager>
    <isAutoRemove>true</isAutoRemove>
    <isPersistent>true</isPersistent>
    <customPersistenceClass></customPersistenceClass>
  </bannedUserManager>
  <extensionRemoteDebug>true</extensionRemoteDebug>
  <useFriendlyExceptions>false</useFriendlyExceptions>
  <mailer>
    <isActive>false</isActive>
    <mailHost>test.mail.com</mailHost>
    <mailUser>foo</mailUser>
    <mailPass>pippo</mailPass>
    <smtpPort>25</smtpPort>
    <workerThreads>1</workerThreads>
  </mailer>
  <webServer>
    <isActive>true</isActive>
    <cfgFile>config/jetty/jetty.xml</cfgFile>
    <blueBoxPollingTimeout>25</blueBoxPollingTimeout>
    <blueBoxMsgQueueSize>20</blueBoxMsgQueueSize>
  </webServer>
  <startExtensionFileMonitor>true</startExtensionFileMonitor>
  <useFriendlyLogging>true</useFriendlyLogging>
  <useDebugMode>true</useDebugMode>
  <sessionMaxIdleTime>20</sessionMaxIdleTime>
  <userMaxIdleTime>300</userMaxIdleTime>
  <licenseCode>**********************</licenseCode>
  <licenseEmails>***************************</licenseEmails>


And some data from the server:

Quad Core Xeon X3440
8GB Memory

Thanks in advance for your help.
User avatar
arodrigo
Posts: 24
Joined: 22 Jul 2011, 10:03
Location: Spain
Contact:

A Screenshot

Postby arodrigo » 25 Nov 2011, 14:30

Image

As you see, when users receives the error, they get automatically disconnected from the server. However, most of them are still online without problems.

We need some help with this. We don't know where could be the problem. Thanks.
Last edited by arodrigo on 28 Nov 2011, 16:17, edited 1 time in total.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 26 Nov 2011, 16:35

Can you please zip and send us the logs showing the disconnections.
Please mention this topic as a reference in the mail. Send it to --> support {{at}} smartfoxserver.com

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
arodrigo
Posts: 24
Joined: 22 Jul 2011, 10:03
Location: Spain
Contact:

Postby arodrigo » 28 Nov 2011, 15:56

Image

We still have the same problem and it is happening even more as more CCU we have.

We already sent you two emails about the problem with logs and screenshots and we did not receive answer yet.

We have found further information in this post. It seems to be the same problem as we have (<1% dropped messages but random disconnecting users)

viewtopic.php?t=11463&postdays=0&postorder=asc&start=0

Please, give us some feedback about it because it is a very bad user experience. We have check everything (bandwith, firewall, cpu, mysql, memory, etc.) and seems to be all ok.

Thanks again for your help.
abcd
Posts: 15
Joined: 11 Jan 2008, 18:26

Postby abcd » 02 Dec 2011, 13:23

Is there any new information about this problem , we also have same issue
User avatar
arodrigo
Posts: 24
Joined: 22 Jul 2011, 10:03
Location: Spain
Contact:

Postby arodrigo » 02 Dec 2011, 13:53

We solved the problem reducing the amount of data that users receive.

http://docs2x.smartfoxserver.com/Gettin ... g#section4

I hope it helps.
abcd
Posts: 15
Joined: 11 Jan 2008, 18:26

Postby abcd » 02 Dec 2011, 19:03

Thank you arodrigo.
Can I ask what max size you set ? Or you reduce the number of the packets sending between server and client i.e. problem was in too many packets?
Thanks again.
sumeetbasak
Posts: 2
Joined: 04 Jun 2014, 21:54

Re: Massive disconnect users caused by a socket error

Postby sumeetbasak » 15 Sep 2014, 08:27

arodringo: did you get any support from smartfox?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Massive disconnect users caused by a socket error

Postby Lapo » 15 Sep 2014, 08:37

sumeetbasak wrote:arodringo: did you get any support from smartfox?

Sorry, why did you revive a 3 years old thread to ask this question? :)
If you have an issue simply start a thread with your request.

Thank you
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 81 guests