Our online multiplayer game works as expected, but after 5-10 days, CPU time of some pool threads starts to grow, Memory Usage graph looks unnatural, and in time it causes our game to freeze. We are restarting our server when it happens, and everything starts to act normal again. But we don't want to restart our servers often, because our game goes down for 5-10 minutes evertime when we do that.
How can we detect why CPU Time of these pool threads increase in time, and how can we reduce them?
pool-1-thread-2 CPU time goes very high
pool-1-thread-2 CPU time goes very high
- Attachments
-
- poolthread.png
- (195.17 KiB) Not downloaded yet
Re: pool-1-thread-2 CPU time goes very high
Hi,
the server works perfectly fine. The CPU usage is very low: you must look at the CPU graph, which tells you that the CPU usage is less than 4% most of the time.
The thread table simply tells you which threads are working the most. In other words the thread at 72% is the one responsible for 72% of the global CPU usage, which is 3.75.
Bottom line: the server is using very little CPU resources and there's nothing to worry about.
Cheers
the server works perfectly fine. The CPU usage is very low: you must look at the CPU graph, which tells you that the CPU usage is less than 4% most of the time.
The thread table simply tells you which threads are working the most. In other words the thread at 72% is the one responsible for 72% of the global CPU usage, which is 3.75.
Bottom line: the server is using very little CPU resources and there's nothing to worry about.
Cheers
Re: pool-1-thread-2 CPU time goes very high
Sometimes game starts to freeze in some rooms after server runs for several days, we thought the cause is some memory leaks at start, but looks like the reason is somewhere else. I didn't want to create another thread for that, becuase I'm still seeking to find out why my game starts to act unnatural when my server runs longer than a few days.
For example, our game froze in some rooms tonight. Extension didn't respond for a minute. Hundreds of these type of error messages are written to smartfox.log by that period:
How can we detect the reason of this behavior?
For example, our game froze in some rooms tonight. Extension didn't respond for a minute. Hundreds of these type of error messages are written to smartfox.log by that period:
Code: Select all
20 Jul 2021 | 01:41:21,572 | ERROR | SFSWorker:Ext:3 | controllers.v290.ExtensionReqController | | java.lang.NullPointerException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error while handling client request in extension: { Ext: GameExtension, Type: JAVA, Lev: ZONE, { Zone: game}, {} }
Extension Cmd: hand_strength
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Code: Select all
20 Jul 2021 | 01:41:21,670 | INFO | pool-1-thread-4 | Extensions | | {null}: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. Query:INSERT INTO TABLE(col1, col2) VALUES(?, ?)
How can we detect the reason of this behavior?
Re: pool-1-thread-2 CPU time goes very high
Hi,
the problem above is typically resolved by modifying the MySQL config.
Take a look at this previous post:
viewtopic.php?t=17388
The solution is to comment out the skip_networking rule.
Cheers
the problem above is typically resolved by modifying the MySQL config.
Take a look at this previous post:
viewtopic.php?t=17388
The solution is to comment out the skip_networking rule.
Cheers
Re: pool-1-thread-2 CPU time goes very high
Thank you for your quick response.
There is no skip_networking rule in my my.cnf file, but there is skip_external_locking rule. Shall I comment it out? May it cause this issue?
Here is my full my.cnf:
There is no skip_networking rule in my my.cnf file, but there is skip_external_locking rule. Shall I comment it out? May it cause this issue?
Here is my full my.cnf:
Code: Select all
[mysqld]
disable-log-bin=1
default-authentication-plugin=mysql_native_password
default-storage-engine = MyISAM
innodb_file_per_table = 1
performance-schema = 0
max_allowed_packet = 268435456
open_files_limit = 10000
skip_external_locking
max_connections = 4096
key_buffer_size = 512M
innodb_buffer_pool_size = 512M
innodb_log_file_size = 256M
table_open_cache=3000
skip-host-cache
sql_mode=""
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
slow_query_log=1
slow_query_log_file="/var/log/mysql/mysql_slowquery.log"
Re: pool-1-thread-2 CPU time goes very high
Shall I comment it out? May it cause this issue?
No, that's not the same parameter so I wouldn't recommend changing it. It's also unrelated with the issue you have reported.
Since this is most likely a MySQL issue I can suggest to take a look at this topic on StackOverflow:
https://stackoverflow.com/questions/686 ... -and-mysql
In the first answer they suggest a number of settings and things to check to avoid the problem.
Let us know if it helps.
Cheers
Who is online
Users browsing this forum: Bing [Bot] and 143 guests