sysbench icon indicating copy to clipboard operation
sysbench copied to clipboard

FATAL: Worker threads failed to initialize within 120 seconds!

Open cyckax opened this issue 3 years ago • 0 comments

Hi,

I use the command below: sysbench --mysql-host=*** --mysql-port=*** --mysql-user=*** --mysql-password=*** --mysql-db=sbtest --tables=50000 --table_size=100000 --rand-type=uniform --threads=256 --thread-init-timeout=120 --time=259200 --report-interval=1 --percentile=99 --skip_trx=on --db-ps-mode=disable --mysql-ignore-errors=all ./lua/oltp_read_only.lua run

I've reviewd some related issues but I found that there already have 256 threads connected to the mysql server but all of these threads are in sleep state,they dont work. just like this : | 4706703 | sysbench | 1.1.1.1:47264 | sbtest | Sleep | 120 | | NULL | | 4706704 | sysbench | 1.1.1.1:47266 | sbtest | Sleep | 120 | | NULL | | 4706705 | sysbench | 1.1.1.1:47265 | sbtest | Sleep | 120 | | NULL | | 4706706 | sysbench | 1.1.1.1:47268 | sbtest | Sleep | 120 | | NULL | | 4706707 | sysbench | 1.1.1.1:47271 | sbtest | Sleep | 120 | | NULL | | 4706708 | sysbench | 1.1.1.1:47272 | sbtest | Sleep | 120 | | NULL | | 4706709 | sysbench | 1.1.1.1:47273 | sbtest | Sleep | 120 | | NULL | | 4706710 | sysbench | 1.1.1.1:47274 | sbtest | Sleep | 120 | | NULL | | 4706711 | sysbench | 1.1.1.1:47276 | sbtest | Sleep | 120 | | NULL | | 4706712 | sysbench | 1.1.1.1:47278 | sbtest | Sleep | 120 | | NULL | | 4706713 | sysbench | 1.1.1.1:47279 | sbtest | Sleep | 120 | | NULL | | 4706714 | sysbench | 1.1.1.1:47280 | sbtest | Sleep | 120 | | NULL |

After the "--thread-init-timeout" expired, the sysbench exit with the error.

I also check the dmesg and nothing to show that the server meet sync flood.

net.core.somaxconn=32768 net.ipv4.tcp_max_syn_backlog=65535

netstat shows : tcp 0 0 2.2.2.2:3333 1.1.1.1:47131 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47265 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47105 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47216 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47062 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:46967 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47178 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47276 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47078 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47182 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:46995 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47030 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:47250 ESTABLISHED 17966/mysqld
tcp 0 0 2.2.2.2:3333 1.1.1.1:46937 ESTABLISHED 17966/mysqld

what can I do to solve this?

cyckax avatar Mar 04 '21 09:03 cyckax