首页 > 高性能 > 性能测试

sysbench FATAL: error 2004: Can't create TCP/IP socket (24) FATAL:
时间:2020-05-27 17:30:14  点击: 来源:  作者:

sysbench 测试报错:
sysbench 1.0.17 (using system LuaJIT 2.0.4)

Running the test with following options:
Number of threads: 1280
Report intermediate results every 5 second(s)
Initializing ...

sysbench 测试报错:

sysbench 1.0.17 (using system LuaJIT 2.0.4)

Running the test with following options:
Number of threads: 1280
Report intermediate results every 5 second(s)
Initializing random number generator from current time


Initializing worker threads...

FATAL: Cannot find benchmark '/usr/share/sysbench/oltp_point_select.lua': no such built-in test, file or module
FATAL: unable to connect to MySQL server on host '127.0.0.1', port 3306, aborting...
FATAL: error 2004: Can't create TCP/IP socket (24)
FATAL: `thread_init' function failed: /usr/share/sysbench/oltp_common.lua:349: connection creation failed
FATAL: /usr/share/sysbench/oltp_point_select.lua:22: module 'oltp_common' not found:



 

ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63389
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited

open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 63389
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


可能看到 open files值为默认1024,这里我们改大:

echo"
* hard nofile 65535
* soft nofile 65535
">>/etc/security/limits.conf

ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63389
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited

open files                      (-n) 65535
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 63389
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

 
新开ssh窗口或重启系统后重新测试即可。
 

”您可通过以下微信二维码,赞赏作者“
 
 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
推荐资讯
windows如何挂载webdav?
windows如何挂载webda
linux服务器同步互联网时间
linux服务器同步互联
亚马逊云lightsail服务器使用教程 | 亚马逊云lightsail使用指南
亚马逊云lightsail服
hostdare 4折优惠,直接降价60% 美国洛杉矶低至 $10.4/年 768M内存/1核/10gNVMe/500g流量
hostdare 4折优惠,直接
相关文章
栏目更新
栏目热门

关于我们 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | WAP | RSS


Copyright © 运维之家 2013-2024