Hi Lapo.
I have deployed my game to new server with license 200. But when I test login, event take very slowly. I logged detail my process within event (USER_LOGIN and USER_JOIN_ZONE)
20 Dec 2015 | 23:32:26,861 | INFO | SocketReader | bitswarm.sessions.DefaultSessionManager | | Session created: { Id: 24, Type: DEFAULT, Logged: No, IP: 14.177.227.123:35723 } on Server port: 9933 <---> 35723
20 Dec 2015 | 23:32:28,612 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null Start get input params
20 Dec 2015 | 23:32:28,614 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null Null input
20 Dec 2015 | 23:32:28,615 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null End get input params
20 Dec 2015 | 23:32:28,617 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null Start login with normal login type
20 Dec 2015 | 23:32:28,687 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null End login with normal login type
20 Dec 2015 | 23:32:28,688 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null Start process with login error code
20 Dec 2015 | 23:32:28,690 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null Start process with login ok code
20 Dec 2015 | 23:32:28,721 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null User dungdt login successfully!!!. Duration: 109
20 Dec 2015 | 23:32:28,724 | INFO | pool-1-thread-3 | v2.api.SFSApi | | User login: { Zone: GameZone1 }, ( User Name: dungdt, Id: 20, Priv: 0, Sess: 14.177.227.123:35723 ) , Type: unknown
20 Dec 2015 | 23:32:30,327 | INFO | pool-4-thread-11 | Extensions | | {GameZoneExtension_1}: UserJoinedZoneHandler: Start Process joined Room
20 Dec 2015 | 23:32:30,390 | INFO | pool-4-thread-11 | Extensions | | {GameZoneExtension_1}: UserJoinedZoneHandler: Set uservariable (am,amf) for user dungdt: (100000,102474920). Duration: 60
My Login handler take 109ms to complated but after ~ 1500ms event USER_JOIN_ZONE is fire ( as start login in my UserJoinedZoneHandler and it taked 60ms to complete).
In my develope server it's take faster ( 2 event happend immediately as soon as other event finish ).
In addition, when I do stress test with my game in login function ( with scenario is 4 thread take 100 user login, each thread take user connect delay random 500-1000ms after past, when user client received connected event, it sent login immediately) but duration between sent login to receive USER_LOGIN event increase regular . First user only taked 300-400ms but twenty user take up to 2000ms, and user hundredth event can not login because timeout or session expire. Please help me.
Thanks.
Slow login
Re: Slow login
There must be something slowing down the login process... database for example?
That's usually the culprit.
Do you use one? You didn't say...
That's usually the culprit.
Do you use one? You didn't say...
Re: Slow login
My Login process use Webservice, but I'm added log in start and finish line (event log duration) in my Login Function.
Start
20 Dec 2015 | 23:32:28,612 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null Start get input params
Finish
20 Dec 2015 | 23:32:28,721 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null User dungdt login successfully!!!. Duration: 109
My Login handler take only 109ms to finished but after 1500ms , my JOIN_ZONE handler was called
20 Dec 2015 | 23:32:30,327 | INFO | pool-4-thread-11 | Extensions | | {GameZoneExtension_1}: UserJoinedZoneHandler: Start Process joined Room
Start
20 Dec 2015 | 23:32:28,612 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null Start get input params
Finish
20 Dec 2015 | 23:32:28,721 | INFO | pool-1-thread-3 | Extensions | | {GameZoneExtension_1}: LoginEventHandler: null User dungdt login successfully!!!. Duration: 109
My Login handler take only 109ms to finished but after 1500ms , my JOIN_ZONE handler was called
20 Dec 2015 | 23:32:30,327 | INFO | pool-4-thread-11 | Extensions | | {GameZoneExtension_1}: UserJoinedZoneHandler: Start Process joined Room
Re: Slow login
More Infomation of my Server: Virtual Server using VMWare ESXi 5.5, when deploy SmartFox on virtual Server, all of thing is slowdown.
Re: Slow login
Thanks.
The webservice is similar to a database, SmartFox needs to connect to an external service via HTTP which is usually not very fast.
Also isn't the webservice talking to a database in order to check the credentials? This add an extra step.
Well this is just one login instance. We should see many of them to understand what kind of delay is going on. A single example is not enough to understand what is going on. Maybe the JVM was just cold started? Or maybe there is a threading issue.
Speaking of which... it looks like you're running an old SmartFoxServer. What version is it?
Thanks
The webservice is similar to a database, SmartFox needs to connect to an external service via HTTP which is usually not very fast.
Also isn't the webservice talking to a database in order to check the credentials? This add an extra step.
My Login handler take only 109ms to finished but after 1500ms , my JOIN_ZONE handler was called
20 Dec 2015 | 23:32:30,327 | INFO | pool-4-thread-11 | Extensions | | {GameZoneExtension_1}: UserJoinedZoneHandler: Start Process joined Room
Well this is just one login instance. We should see many of them to understand what kind of delay is going on. A single example is not enough to understand what is going on. Maybe the JVM was just cold started? Or maybe there is a threading issue.
Speaking of which... it looks like you're running an old SmartFoxServer. What version is it?
Thanks
Who is online
Users browsing this forum: No registered users and 86 guests