赤峰项目Nginx进程异常的处理办法
#强制杀掉Nginx
ps -ef|grep nginx|grep -v grep|awk '{print $2}'|xargs kill -9
rm -rf /usr/local/openresty/nginx/logs/nginx.pid
(1)如果进程中没有NGINX存在:
[root@huanghai conf]# ps -ef|grep nginx|grep -v grep|awk '{print $2}'|xargs kill -9
usage: kill [ -s signal | -p ] [ -a ] pid ...
kill -l [ signal ]
(2)如果进程中有NGINX存在,那么无回显
#重启Nginx
service nginx restart && ps -ef | grep nginx
kill -9 杀不掉进程的原因
http://blog.csdn.net/u012349696/article/details/52250640
ps aux | grep nginx | grep -v grep
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 9562 0.0 0.0 52664 1344 ? Ss 22:27 0:00 nginx: master process /usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
nobody 9566 0.0 0.0 53036 1976 ? S 22:27 0:00 nginx: worker process
nobody 9567 0.0 0.0 53036 2044 ? S 22:27 0:00 nginx: worker process
nobody 9568 0.0 0.0 53036 2044 ? S 22:27 0:00 nginx: worker process
nobody 9569 0.0 0.0 53036 2016 ? S 22:27 0:00 nginx: worker process
D状态的进程是硬件资源不满足而处于深度休眠状态, 一般是等待磁盘. 这种进程用kill -9杀不掉, 要么继续等, 要么重启
stat 中的参数意义如下:
D 不可中断 Uninterruptible(usually IO)
R 正在运行,或在队列中的进程
S 处于休眠状态
T 停止或被追踪
Z 僵尸进程
W 进入内存交换(从内核2.6开始无效)
X 死掉的进程
< 高优先级
n 低优先级
s 包含子进程
+ 位于后台的进程组
#查看io情况
yum install iotop -y
yum install sysstat -y
[root@huanghai ~]# iotop
Total DISK READ: 0.00 B/s | Total DISK WRITE: 0.00 B/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
4 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
5 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [stopper/0]
6 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/0]
7 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [events/0]
8 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [events/0]
9 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [events_long/0]
10 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [events_power_ef]
11 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cgroup]
12 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [khelper]
13 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [netns]
14 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [async/mgr]
15 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [pm]
16 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [sync_supers]
17 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [bdi-default]
18 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kintegrityd/0]
[root@huanghai ~]#ps -ef | grep nginx
root 1424 1 0 22:41 ? 00:00:00 nginx: master process /usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
root 1427 1351 0 22:41 pts/0 00:00:00 grep nginx
nobody 1428 1424 0 22:41 ? 00:00:00 nginx: worker process
nobody 1429 1424 0 22:41 ? 00:00:00 nginx: worker process
nobody 1430 1424 0 22:41 ? 00:00:00 nginx: worker process
nobody 1431 1424 0 22:41 ? 00:00:00 nginx: worker process
先对一下时间:
ntpdate cn.ntp.org.cn
[root@huanghai ~]# pidstat -d -p 1424
Linux 2.6.32-696.el6.x86_64 (huanghai) 2017年08月26日 _x86_64_ (1 CPU)
22时41分27秒 PID kB_rd/s kB_wr/s kB_ccwr/s Command
22时41分27秒 1424 0.00 0.01 0.00 nginx
由此来测算NGINX的无响应情况下它的IO使用情况如何。
还有就是赤峰还需要进一步检查系统优化情况,打开文件数等参数是否设置正确。
赤峰项目Nginx进程异常的处理办法的更多相关文章
- Android native进程间通信实例-socket本地通信篇之——服务端进程异常退出解决办法
导读: 好难受啊,为什么服务端说挂就挂,明明只是客户端关闭而已,服务端怎么能挂呢? 想想,如果手机上使用一个聊天程序的时候,手机端关闭了聊天程序,那么远端服务器程序总不能说挂就挂吧!所以一定要查明真相 ...
- 解决openoffice进程异常退出的办法
步骤1 编写脚本 openoffice.sh #!/usr/bin/bash OPENOFFICEPID=`ps -ef|grep "/opt/openoffice4/program/sof ...
- 解决openoffice进程异常退出的办法:
实现以守护进程,定时检测openoffice是否退出,如果进程不存在,通过脚本将openoffice起起来即可. 具体操作步骤: 第一步: 将openoffice.sh脚本放置在root目录下面, ...
- Nginx问题定位之监控进程异常退出
nginx在运行过程中是否稳定,是否有异常退出过?这里总结几项平时会用到的小技巧. 1. 在error.log中查看是否有signal项,如果有,看看signal是多少. 比如,这是一个异常退出的情况 ...
- 如何实现Nginx+Keepalived中Nginx进程的高可用
此架构我简单说明下: 一般为了维护方便,企业网站的服务器都在自己的内部机房里,只开放了Keepalived的VIP地址的两个端口80.443,通过Juniper SSG550防火墙映射出去,外网DNS ...
- Java-----关于eclipse导入项目发生的问题及解决办法
今天通过eclipse导入了几个项目,项目名出现红叉,对于我这样的强迫症来说是无法容忍的,故现做总结,遇到同学可按照以下方法来操作. 改动的地方主要是两个方面: 1.Tomcat版本问题. 此问题是由 ...
- 【学习笔记】启动Nginx、查看nginx进程、查看nginx服务主进程的方式、Nginx服务可接受的信号、nginx帮助命令、Nginx平滑重启、Nginx服务器的升级
1.启动nginx的方式: cd /usr/local/nginx ls ./nginx -c nginx.conf 2.查看nginx的进程方式: [root@localhost nginx] ...
- Address already in use: JVM_Bind:80 异常的解决办法
java.net.BindException: Address already in use: JVM_Bind:80 异常的解决办法 今天遇见了这个端口被占用问题 然后各种百度 先是说 用命令 ne ...
- Tomcat异常及解决办法——持续更新中
公司项目,开发语言为java,中间件为Tomcat,运行过程中,从Tomcat出现了一些异常,现将异常及解决办法记录如下,仅供参考.(不断在补充中.......) 异常一: 1.日志内容 org.ap ...
随机推荐
- ArcGIS Engine开发中利用GP工具时常出现的错误
在用GP工具的时候常常会碰到这个错误: 调用 GP 对 COM 组件的调用返回了错误 HRESULT E_FAIL 解决方案: 这种情况一般有两种可能. 1.AE程序的license的级别不够. 2. ...
- 编译程序提示配置PKG_CONFIG_PATH
http://blog.csdn.net/langeldep/article/details/6804331 在安装开源软件的过程中, 经常会碰到提示配置PKG_CONFIG_PATH路径, 或者直接 ...
- 【bzoj4548】小奇的糖果 STL-set+树状数组
题目描述 平面上有n个点,每个点有一种颜色.对于某一条线段,选择所有其上方或下方的点.求:在不包含所有颜色的点的前提下,选择的点数最多是多少.(本题中如果存在某颜色没有相应的点,那么选择任何线段都不算 ...
- P4109 [HEOI2015]定价
题目描述 在市场上有很多商品的定价类似于 999 元.4999 元.8999 元这样.它们和 1000 元.5000 元和 9000 元并没有什么本质区别,但是在心理学上会让人感觉便宜很多,因此也是商 ...
- [Leetcode] text justification 文本对齐
Given an array of words and a length L, format the text such that each line has exactly L characters ...
- 【CF Round 434 A. k-rounding】
Time limit per test1 second memory limit per test 256 megabytes input standard input output standard ...
- Hello to the cruel world
- vector 基础2
size :返回有效元素个数 max_size :返回 vector 支持的最大元素个数 resize :改变有效元素的个数 capacity :返回当前可使用的最大元素内存块数(即存储容量) ...
- 洛谷P1346 电车
P1346 电车 236通过 757提交 题目提供者yeszy 标签图论福建省历届夏令营 难度普及/提高- 提交该题 讨论 题解 记录 最新讨论 解不好啊,快疯了!!哪位大… 求解:为何除了-1的点之 ...
- Codeforces Round #526 (Div. 2) E. The Fair Nut and Strings
E. The Fair Nut and Strings 题目链接:https://codeforces.com/contest/1084/problem/E 题意: 输入n,k,k代表一共有长度为n的 ...