MySQL社区

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 2165|回复: 0
打印 上一主题 下一主题

[性能优化] [求助求助]ubuntu系统mysql最大连接数问题搞死人了

[复制链接]
跳转到指定楼层
1#
发表于 2016-9-22 18:00:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大伙帮忙看看,实在搞不定了,机房服务器mysql最大连接死活调不上去。

基于以下系统:
linux:Ubuntu 16.04.1 LTS (GNU/Linux4.4.0-36-generic x86_64)
mysql:5.7.15-0ubuntu0.16.04.1 /5.7.13-0ubuntu0.16.04.2-log

已经修改了以下文件:
/etc/security/limits.conf:
*                soft    nofile          65535
*                hard    nofile          65535
*                soft    nproc           65535
*                hard    nproc           65535

/etc/profile:
ulimit -SHn 65535

/lib/systemd/system/mysql.service
LimitNOFILE=65535
LimitNPROC=65535

mysql配置max_connections = 3000

改完所有参数之后
1.mysql数据库查询最大连接是3000
2.ulimit -a命令查询 openfiles:65535  、maxuser processes:65535

但是实际程序跑的过程中,最大连接只能取到485个,再取就开始报错:
ERROR 1135: Can't create a new thread (errno 12). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 分享淘帖 顶 踩
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|申请友链|小黑屋|Archiver|手机版|MySQL社区 ( 京ICP备07012489号   
联系人:周生; 联系电话:13911732319

GMT+8, 2024-5-3 16:56 , Processed in 0.068686 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表