php错误日志分析_php错误日志

本文介绍了如何在Linux环境中查找并编辑php-fpm.conf文件,以改变PHP错误日志的路径,并设置为/var/log/php-fpm/php-fpm.log。然后,通过重启php-fpm服务来应用更改。最后,展示了如何查看和分析php-fpm.log日志,包括子进程退出警告、脚本执行超时和性能监控等信息。
摘要由CSDN通过智能技术生成

检测php运行时或用户自记录错误日志:http://blog.csdn.net/ty_hf/article/details/55505262

## 查找

```

find / -name php-fpm.conf

vim /usr/local/php/etc/php-fpm.conf

```

## 更改路径

step2:去掉分号,更改路径

将 `;error_log = log/php-fpm.log` 更改为: `error_log = /var/log/php-fpm/php-fpm.log`

## 重新启动

```

/etc/init.d/php-fpm stop

/etc/init.d/php-fpm start

```

## 查看

```

vim /var/log/php-fpm/php-fpm.log

```

## 分析

```

[21-Dec-2018 16:18:12] WARNING: [pool www] child 5545 exited on signal 15 (SIGTERM) after 136.663606 seconds from start

[21-Dec-2018 16:18:12] NOTICE: [pool www] child 6490 started

[21-Dec-2018 16:18:32] WARNING: [pool www] child 5059, script '/var/www/health.sxctkj.cc/public/index.php' (request: "POST /index.php") execution timed out (30.375807 sec), terminating

[21-Dec-2018 16:18:32] WARNING: [pool www] child 5059 exited on signal 15 (SIGTERM) after 231.997570 seconds from start

[21-Dec-2018 16:18:32] NOTICE: [pool www] child 6608 started

[21-Dec-2018 16:18:33] WARNING: [pool www] child 5068, script '/var/www/health.sxctkj.cc/public/index.php' (request: "POST /index.php") execution timed out (30.127709 sec), terminating

[21-Dec-2018 16:18:33] WARNING: [pool www] child 5068 exited on signal 15 (SIGTERM) after 231.663502 seconds from start

[21-Dec-2018 16:18:33] NOTICE: [pool www] child 6619 started

[21-Dec-2018 16:18:54] WARNING: [pool www] child 6619, script '/var/www/health.sxctkj.cc/public/index.php' (request: "POST /index.php") executing too slow (2.476524 sec), logging

[21-Dec-2018 16:18:54] NOTICE: child 6619 stopped for tracing

[21-Dec-2018 16:18:54] NOTICE: about to trace 6619

[21-Dec-2018 16:18:54] NOTICE: finished trace of 6619

```

问:能不能分析控制器等等呢?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值