UBUNTU 下 APACHE2 Too many open files: Error retrieving pid file /var/run/apache2.pid
cat /proc/sys/fs/file-max 系统可打开的最大文件个数
ulimit -n 当前系统限制的个数
ulimit -n 10240 调整当前系统的限制
修改/etc/sysctl.conf, 加入
net.ipv4.ip_local_port_range = 1024 65000
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.ipv4.tcp_rmem=4096 87380 16777216
net.ipv4.tcp_wmem=4096 65536 16777216
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_sack = 1
net.core.netdev_max_backlog = 262144
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_keepalive_time= 30
net.ipv4.tcp_max_tw_buckets= 6000
net.core.somaxconn = 65535
fs.file-max = 1024000
sysctl -p 无需重启 立刻使生效
netstat -antup | wc -l
netstat -antup | grep 'TIME_WAIT' | wc -l
netstat -antup | grep 'SYN_RECV' | wc -l
UBUNTU 下 APACHE2 Too many open files: Error retrieving pid file /var/run/apache2.pid的更多相关文章
- nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) ...
- nginx启动或者重启失败,报错nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
第一种方案: 1. 执行命令 :open /usr/local/etc/nginx 打开nginx安装目录 nginx安装目录默认位置有:(找到适合你的) /etc/nginx/nginx.conf, ...
- nginx报错 [error] open() “/usr/local/var/run/openresty.pid” failed (2: No such file or directory)
解决: 服务没有启动 使用start启动服务,因为没有start而直接使用stop或者reload报错这个问题: 如果方法一没有解决,使用方法二:-C 指定配置文件nginx.conf或者weblua ...
- centos6.6下编译安装mysql5.6之后启动失败:Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
今天在编译安装mysql5.6时候出现Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysq ...
- linux下mysql启动 Starting MySQL. ERROR! The server quit without updating PID file(xxx/x.pid)
service mysql start 报错: Starting MySQL. ERROR! The server quit without updating PID file(xxx/x.pid) ...
- mysqld_safe error: log-error set to '/data/log/mysqld.log', however file don't exists. Create writable for user 'mysql'.The server quit without updating PID file (/data/mysql/mysqld.pid)
[oot@cent65 bin]# service mysqld startStarting MySQL.2019-10-28T15:56:47.786960Z mysqld_safe error: ...
- mysql修改后启动my.cnf报错Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
mysql中文乱码解决 mysql修改my.cnf后启动报错Starting MySQL... ERROR! The server quit without updating PID file (/v ...
- nginx重启报错:nginx: [error] invalid PID number "" in "/run/nginx.pid"
问题描述:执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number “” in “/run/ngin ...
- nginx: [error] invalid PID number "" in "/run/nginx.pid"
在重启云主机(系统)之后,执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number “” in “/ ...
随机推荐
- modelsim读写TXT文件
//open the file Initial Begin step_file = $fopen("F:/Company/Src/txt/step.v","r" ...
- DIV+CSS实战(三)
一.说明 在上篇博客<DIV+CSS实战(二)>中,实现了头部以及Tab标签卡,下面开始实现内容区域,要实现的效果如下: 二.内容最外层的设计(边框) 给最外层加边框,并且设置高度随着里面 ...
- SqlCommand和SqlDataAdapter的区别
SqlDataAdapter对象 一.特点介绍1.表示用于填充 DataSet 和更新 SQL Server 数据库的一组数据命令和一个数据库连接.2.在SqlDataAdapter和DataSet之 ...
- struts2 file
JavaBean 中: private File[] pic; private String[] picContentType; private String [] picFileName; sett ...
- Get同步请求
//同步get请求 // NSURL: iOS 中的URL存储类,可存储网址或者文件路径 NSString *urlString = @"http://api.map. ...
- OpenGl 中的基本数据类型
OpenGl 中的基本数据类型 为了便于 OpenGL在各种平台上移植,OpenGL定义了自己的数据类型. 如果你愿意也可用这些数据类型对应的标准C的数据类型来替代.如OpenGL也定义 GLvoid ...
- spring mvc学习笔记(一)web.xml文件配置的一点重要信息
通过这个web.xml文件可以看出,所有的*.shtml的请求,都会被springmvc这个servlet处理.这里如果没有指定contextConfigLocation这个参数,将会按照默认规则在c ...
- Windows Server 2008 R2远程桌面服务配置和授权激活
远程桌面服务安装好之后使用的是120天临时授权,所以会跳出以下提示,我们介绍远程桌面授权的激活. 现在我们使用命令 mstsc /admin 强制登录服务器 需要在“远程桌面服务”--安装“远程桌面授 ...
- 取Mac地址
uses Nb30; //一般用默认的 0 就可以了 ):string; var ncb : TNCB; {NetBios控制块} AdapterS : TAdapterStatus; {网卡状态结构 ...
- Python学习-27.Python中的列表(list)
列表已经用了很多次了.使用中括号包含元素. list = ['a','b','c'] 获取元素使用[]. print(list[0]) 输出a 不过值得注意的是,[]只能是0到元素个数-1吗?在Pyt ...