yanqzh 发表于 2017-7-9 08:57:10

一直的500 , 502,受不了吖

早上一起来,又来了,查看vi /usr/local/php/var/log/php-fpm.log
WARNING: child 5508 exited on signal 11 (SIGSEGV) after 46117.548253 seconds from start
NOTICE: child 27859 started
WARNING: 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
WARNING: 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
WARNING: 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

貌似设置的够多吖

# netstat -anp|grep "php-fpm"|grep "tcp"|grep "pool"|wc -l
119
# ps -fe |grep "php-fpm"|grep "pool"|wc -l
121


系统:centos7   php7.0.19   mysql5.5    内存8G    CPU2核   lnmp1.4

yanqzh 发表于 2017-7-9 13:25:57

安装了memcached,默认配置
启用了opcache,内存缓存256M

licess 发表于 2017-7-9 20:01:18

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

502置顶帖有说明,建议开php-fpm慢日志结合php-fpm日志和502时间进行排查

yanqzh 发表于 2017-7-10 09:19:28

php-fpm.log最新错误
NOTICE: child 18587 started
WARNING: child 2499 exited with code 1 after 50405.975762 seconds from start
NOTICE: child 18605 started
WARNING: child 2489 exited with code 1 after 50411.790043 seconds from start
NOTICE: child 18606 started
WARNING: child 2523 exited on signal 11 (SIGSEGV) after 51926.566356 seconds from start
NOTICE: child 19069 started
WARNING: child 2514 exited on signal 11 (SIGSEGV) after 58823.344953 seconds from start
NOTICE: child 21685 started
WARNING: child 2502 exited on signal 11 (SIGSEGV) after 58831.703639 seconds from start

yanqzh 发表于 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,得几个站的错误记录如下:

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
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
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
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
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
================
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
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
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
====================
PHP Fatal error:Cannot declare trait , because the name is already in use in /wwwroot/wiki/includes/specials/SpecialListfiles.php on line 24
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
PHP Fatal error:Cannot declare class UploadLogFormatter, because the name is already in use in /wwwroot/wiki/includes/logging/UploadLogFormatter.php on line 30
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
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也没有报错

licess 发表于 2017-7-10 15:23:36

看php错误日志内存不足了,无法分配内存了

yanqzh 发表于 2017-7-10 16:23:16

回复 6# 的帖子

8G内存,p.php显示有4、5G的空闲内存。

yanqzh 发表于 2017-7-22 18:52:27

回复 3# 的帖子

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

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

这个情况下,应该怎么办?重新安装环境的话,用完整包吗?当时 是在线安装的,PHP及MYSQL各用什么版本好?PHP貌似只有7.0.19可选

yanqzh 发表于 2017-7-22 19:02:10

重新安装php是否可行?

licess 发表于 2017-7-22 21:18:34

回复 8# 的帖子

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

没法说哪个版本最好,自行去该程序官网上推荐的php和mysql版本
页: [1]
查看完整版本: 一直的500 , 502,受不了吖