SfsExtensionRequest request problem

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

Moderators: Lapo, Bax

adifong
Posts: 20
Joined: 10 Aug 2016, 06:50

SfsExtensionRequest request problem

Postby adifong » 29 Jan 2019, 11:38

Hi,

i have problem with SfsExtensionRequest, so when user press button and request sfs.. in sfs server not receive it directly..
so this case not all time, but sometimes..
and i already check the log.. said that i request sfs at 10:00:01, and in the log receive at 10:00:20 (sfsworker),
and the log in at 10:00:01 to 10:00:20 only have pool-thread log.. and after this can receive request extension normally..

for information i have player 500++ user online, and 50++ room active, i used 2000 lisence.., so all the player when at 10:00:01 - 10:00:20 cannot SfsExtensionRequest,
but after that can normally.. and this happen again about 10minute later.. and after that normal again...

and i just change config server :
- schedulerThreadPoolSize from 4 to 8 ( because when use 4 the pool thread only have 4, and i think make the scheduler so slow)
but after change to 8.. i get this problem..

thank you

adi

and all the setting i use default..
<systemThreadPoolSettings>
<name>Sys</name>
<coreThreads>4</coreThreads>
<backupThreads>16</backupThreads>
<maxBackups>64</maxBackups>
<queueSizeTriggeringBackup>100</queueSizeTriggeringBackup>
<secondsTriggeringBackup>50</secondsTriggeringBackup>
<backupThreadsExpiry>3600</backupThreadsExpiry>
<queueSizeTriggeringBackupExpiry>60</queueSizeTriggeringBackupExpiry>
<logActivity>true</logActivity>
<queueFullWarningInterval>300</queueFullWarningInterval>
</systemThreadPoolSettings>
<extensionThreadPoolSettings>
<name>Ext</name>
<coreThreads>4</coreThreads>
<backupThreads>16</backupThreads>
<maxBackups>64</maxBackups>
<queueSizeTriggeringBackup>100</queueSizeTriggeringBackup>
<secondsTriggeringBackup>50</secondsTriggeringBackup>
<backupThreadsExpiry>3600</backupThreadsExpiry>
<queueSizeTriggeringBackupExpiry>60</queueSizeTriggeringBackupExpiry>
<logActivity>true</logActivity>
<queueFullWarningInterval>300</queueFullWarningInterval>
</extensionThreadPoolSettings>
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SfsExtensionRequest request problem

Postby Lapo » 29 Jan 2019, 15:03

Hi,
the scenario you have described would be possible only if all the Extension threads were already busy doing something else. If this is the case you should see that there are queued Extension messages in the AdminTool. Specifically you can see that in the Dashboard, under the Message Queue Status tab.

I'd recommend checking this while the server is running. Short spikes are not what you're looking for, but if the graph extends for long periods of time (at least 10-20 secs) then we could better understand what is going on.

Do you run I/O calls in your Extension calls, such as database queries or HTTP calls to external servers?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
adifong
Posts: 20
Joined: 10 Aug 2016, 06:50

Re: SfsExtensionRequest request problem

Postby adifong » 30 Jan 2019, 03:23

Hi,

yes i already check, my Extension threads is busy and no Extension threads free..

can you recommended me for setting extension thread for the best scenario if have 2000 user thanks..

Thank you

<systemThreadPoolSettings>
<name>Sys</name>
<coreThreads>4</coreThreads>
<backupThreads>16</backupThreads>
<maxBackups>64</maxBackups>
<queueSizeTriggeringBackup>100</queueSizeTriggeringBackup>
<secondsTriggeringBackup>50</secondsTriggeringBackup>
<backupThreadsExpiry>3600</backupThreadsExpiry>
<queueSizeTriggeringBackupExpiry>60</queueSizeTriggeringBackupExpiry>
<logActivity>true</logActivity>
<queueFullWarningInterval>300</queueFullWarningInterval>
</systemThreadPoolSettings>
<extensionThreadPoolSettings>
<name>Ext</name>
<coreThreads>4</coreThreads>
<backupThreads>16</backupThreads>
<maxBackups>64</maxBackups>
<queueSizeTriggeringBackup>100</queueSizeTriggeringBackup>
<secondsTriggeringBackup>50</secondsTriggeringBackup>
<backupThreadsExpiry>3600</backupThreadsExpiry>
<queueSizeTriggeringBackupExpiry>60</queueSizeTriggeringBackupExpiry>
<logActivity>true</logActivity>
<queueFullWarningInterval>300</queueFullWarningInterval>
</extensionThreadPoolSettings>
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SfsExtensionRequest request problem

Postby Lapo » 30 Jan 2019, 09:02

adifong wrote:Hi,

yes i already check, my Extension threads is busy and no Extension threads free..

Then can you explain why is that so?
What is keeping your Extension threads (there's more than one) busy for so long?

Also you didn't reply to this question:
Do you run I/O calls in your Extension calls, such as database queries or HTTP calls to external servers?



can you recommended me for setting extension thread for the best scenario if have 2000 user thanks..

Not until I understand what you're doing with your server code :)

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
adifong
Posts: 20
Joined: 10 Aug 2016, 06:50

Re: SfsExtensionRequest request problem

Postby adifong » 31 Jan 2019, 00:58

Hi,


Do you run I/O calls in your Extension calls, such as database queries or HTTP calls to external servers?
- yes.. i do I/O and do query for all user, and this query make execute time around 20s so all the worker busy waiting this query done.. and after this done all the worker free can i use.. so i already fix this bugs.

Cheers.. :D :D

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

Re: SfsExtensionRequest request problem

Postby Lapo » 31 Jan 2019, 08:17

A query that takes 20 seconds is very unoptimized. You should check why it takes that long and fix it. Normally the execution time should be a few hundreds milliseconds, max.

Besides the query itself there could also be a problem with latency between SFS2X and the DB server if they don't run on the same machine, or in the same local network. That's another important aspect to look into.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Thomasea and 45 guests