VPS侦探论坛

 找回密码
 注册
查看: 3924|回复: 9

一直的500 , 502,受不了吖

[复制链接]
发表于 2017-7-9 08:57:10 | 显示全部楼层 |阅读模式

早上一起来,又来了,查看vi /usr/local/php/var/log/php-fpm.log
[09-Jul-2017 07:38:54] WARNING: [pool www] child 5508 exited on signal 11 (SIGSEGV) after 46117.548253 seconds from start
[09-Jul-2017 07:38:54] NOTICE: [pool www] child 27859 started
[09-Jul-2017 08:25:27] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 65 idle, and 106 total children
[09-Jul-2017 08:25:28] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 73 idle, and 114 total children
[09-Jul-2017 08:30:10] WARNING: [pool www] child 5503 exited on signal 11 (SIGSEGV) after 49194.056365 seconds from start



查看php-fpm.conf
pm = dynamic
pm.max_children = 300
pm.start_servers = 80
pm.min_spare_servers = 80
pm.max_spare_servers = 300

貌似设置的够多吖

[root@ wwwlogs]# netstat -anp|grep "php-fpm"|grep "tcp"|grep "pool"|wc -l
119
[root@ wwwlogs]# ps -fe |grep "php-fpm"|grep "pool"|wc -l
121


系统:centos7   php7.0.19   mysql5.5    内存8G    CPU2核   lnmp1.4
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-7-9 13:25:57 | 显示全部楼层


安装了memcached,默认配置
启用了opcache,内存缓存256M
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-7-9 20:01:18 | 显示全部楼层

500的话可能程序有问题,需要开php错误日志

502置顶帖有说明,建议开php-fpm慢日志结合php-fpm日志和502时间进行排查
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-7-10 09:19:28 | 显示全部楼层



php-fpm.log最新错误
[10-Jul-2017 06:48:50] NOTICE: [pool www] child 18587 started
[10-Jul-2017 06:49:46] WARNING: [pool www] child 2499 exited with code 1 after 50405.975762 seconds from start
[10-Jul-2017 06:49:46] NOTICE: [pool www] child 18605 started
[10-Jul-2017 06:49:52] WARNING: [pool www] child 2489 exited with code 1 after 50411.790043 seconds from start
[10-Jul-2017 06:49:52] NOTICE: [pool www] child 18606 started
[10-Jul-2017 07:15:07] WARNING: [pool www] child 2523 exited on signal 11 (SIGSEGV) after 51926.566356 seconds from start
[10-Jul-2017 07:15:07] NOTICE: [pool www] child 19069 started
[10-Jul-2017 09:10:04] WARNING: [pool www] child 2514 exited on signal 11 (SIGSEGV) after 58823.344953 seconds from start
[10-Jul-2017 09:10:04] NOTICE: [pool www] child 21685 started
[10-Jul-2017 09:10:12] WARNING: [pool www] child 2502 exited on signal 11 (SIGSEGV) after 58831.703639 seconds from start
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-7-10 09:27:35 | 显示全部楼层

request_slowlog_timeout = 100
slowlog = var/log/slow.log

慢日志已经开启的,vi /usr/local/php/var/log/slow.log结果为空白。

vi /path/php_error.log,得几个站的错误记录如下:

[10-Jul-2017 08:58:50 Etc/GMT-8] PHP Warning:  Declaration of table_forum_post::delete($tableid, $pid, $unbuffered = false) should be compatible with discuz_table::delete($val, $unbuffered = false) in /wwwroot/www/source/class/table/table_forum_post.php on line 0
[10-Jul-2017 08:58:50 Etc/GMT-8] PHP Warning:  Declaration of table_forum_post::insert($tableid, $data, $return_insert_id = false, $replace = false, $silent = false) should be compatible with discuz_table::insert($data, $return_insert_id = false, $replace = false, $silent = false) in /wwwroot/www/source/class/table/table_forum_post.php on line 0
[10-Jul-2017 08:58:50 Etc/GMT-8] PHP Warning:  Declaration of table_forum_post::fetch($tableid, $pid, $outmsg = true) should be compatible with discuz_table::fetch($id, $force_from_db = false) in /wwwroot/www/source/class/table/table_forum_post.php on line 0
[10-Jul-2017 08:58:50 Etc/GMT-8] PHP Warning:  Declaration of table_forum_post::fetch_all($tableid, $pids, $outmsg = true) should be compatible with discuz_table::fetch_all($ids, $force_from_db = false) in /wwwroot/www/source/class/table/table_forum_post.php on line 0
[10-Jul-2017 08:58:50 Etc/GMT-8] PHP Warning:  Declaration of table_forum_post::update_cache($tableid, $id, $idtype, $data, $condition = Array, $glue = 'merge') should be compatible with discuz_table::update_cache($id, $data, $cache_ttl = NULL, $pre_cache_key = NULL) in /wwwroot/www/source/class/table/table_forum_post.php on line 0
================
[09-Jul-2017 08:38:46 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 8456694889142657024 bytes) in /wwwroot/blog/wp-content/themes/twentyseventeen/index.php on line 19
[09-Jul-2017 22:22:08 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 18446744069414584360 bytes) in /wwwroot/blog/wp-includes/general-template.php on line 39
[10-Jul-2017 01:05:53 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 140268540026880 bytes) in /wwwroot/blog/wp-content/plugins/xml-sitemap-feed/includes/feed-sitemap-taxonomy.php on line 35
====================
[09-Jul-2017 05:01:08 PRC] PHP Fatal error:  Cannot declare trait , because the name is already in use in /wwwroot/wiki/includes/specials/SpecialListfiles.php on line 24
[09-Jul-2017 06:29:49 PRC] PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, function 'UploadLogFormatter' not found or invalid function name in /wwwroot/wiki/includes/logging/LogPage.php on line 263
[09-Jul-2017 06:29:49 PRC] PHP Fatal error:  Cannot declare class UploadLogFormatter, because the name is already in use in /wwwroot/wiki/includes/logging/UploadLogFormatter.php on line 30
[09-Jul-2017 06:57:43 PRC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 576743326791761960 bytes) in /wwwroot/wiki/includes/libs/stats/BufferingStatsdDataFactory.php on line 65
[10-Jul-2017 03:10:52 PRC] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 140268535251736 bytes) in /wwwroot/wiki/vendor/oyejorge/less.php/lib/Less/Tree/Element.php on line 72

有的站点内页502,首頁没事,php_error.log也没有报错

军哥运维代购:http://shop63846532.taobao.com/

发表于 2017-7-10 15:23:36 | 显示全部楼层

看php错误日志内存不足了,无法分配内存了
 楼主| 发表于 2017-7-10 16:23:16 | 显示全部楼层

回复 6# 的帖子


8G内存,p.php显示有4、5G的空闲内存。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-7-22 18:52:27 | 显示全部楼层

回复 3# 的帖子


军哥,你好!看回你这个回复,才觉得有深意!

这些天来,此问题一直无法解决。再三看回此帖子,突然想起当初搭建环境时,虽然显示是成功,但是SSH Screen一直没有中断安装环境的会话,而一直停留着,是我ctrl+C强制中断的,当时没有在意,现在回想,确实应该是程序出了问题。

这个情况下,应该怎么办?重新安装环境的话,用完整包吗?当时 是在线安装的,PHP及MYSQL各用什么版本好?PHP貌似只有7.0.19可选
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-7-22 19:02:10 | 显示全部楼层


重新安装php是否可行?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-7-22 21:18:34 | 显示全部楼层

回复 8# 的帖子




和停在安装成功界面没任何关系

没法说哪个版本最好,自行去该程序官网上推荐的php和mysql版本
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-18 00:35 , Processed in 0.028503 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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