所以,长话短说,最新版本的Apache在我的特定设置中导致了一些错误,所以我快速实时升级到PHP 7.1.6,换成了mpm-event,并开始使用PHP- FPM。我想它也可能在某处重新安装了MySQL。
升级后,我的WordPress网站的前端似乎相对较好。管理仪表板有时候还可以 - 但是经常尝试发布一个新页面,或者做类似的事情,它会无限期地挂起。如果我重新启动Apache,它会重新引起注意,但重新启动服务似乎就是诀窍。
在此期间,我的网站的前端也将开始挂起,直到我重新启动Apache。
显然,我的配置在某处出现了问题,但我确实很难确定它是什么。我的网站的前端非常快,直到我在后端做了一些事情,决定将它全部停止。
我一直在检查我能想到的每个错误日志,但是当发生这种情况时,我发现apache2错误日志中没有发生任何事情。据我所知,我启用了PHP-fpm错误记录,但我也没有看到任何显示。
我怎样才能弄清楚此时出了什么问题?
真的很感激任何帮助。我已经花了至少十五个小时试图弄清楚这一点已经没有进展。
谢谢,伙计们。
php -v
PHP 7.1.6-1~ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 9 2017 08:26:34) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.6-1~ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
apache2 -v
Server version: Apache/2.4.26 (Ubuntu)
Server built: 2017-06-30T08:42:23
/var/log/apache2/error.log - 不报告任何错误。
/var/log/fpm-php.www.log - 空。
/var/log/mysql.err - 空。
/var/log/mysql.log - 空。
/var/log/php7.1-fpm.log
[04-Jul-2017 02:08:40] NOTICE: fpm is running, pid 741
[04-Jul-2017 02:08:40] NOTICE: ready to handle connections
[04-Jul-2017 02:08:40] NOTICE: systemd monitor interval set to 10000ms
PHP模块 -
php -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
json
libxml
mbstring
mcrypt
memcached
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
a2query -m:
a2query -m
dir (enabled by maintainer script)
headers (enabled by site administrator)
env (enabled by maintainer script)
authz_host (enabled by maintainer script)
reqtimeout (enabled by maintainer script)
include (enabled by site administrator)
rewrite (enabled by site administrator)
auth_basic (enabled by maintainer script)
alias (enabled by maintainer script)
authz_core (enabled by maintainer script)
asis (enabled by site administrator)
status (enabled by maintainer script)
cache (enabled by site administrator)
echo (enabled by site administrator)
autoindex (enabled by maintainer script)
authz_user (enabled by maintainer script)
fastcgi (enabled by maintainer script)
actions (enabled by site administrator)
filter (enabled by maintainer script)
mime (enabled by maintainer script)
expires (enabled by site administrator)
setenvif (enabled by maintainer script)
mpm_event (enabled by site administrator)
socache_shmcb (enabled by site administrator)
authn_file (enabled by maintainer script)
proxy (enabled by site administrator)
access_compat (enabled by maintainer script)
ssl (enabled by site administrator)
deflate (enabled by maintainer script)
authn_core (enabled by maintainer script)
suexec (enabled by site administrator)
negotiation (enabled by maintainer script)
proxy_fcgi (enabled by site administrator)
speling (enabled by site administrator)
http2 (enabled by maintainer script)
info (enabled by site administrator)
proxy_http2 (enabled by site administrator)
我不确定它是什么,但/var/log/apport.log包含一些错误,如下所示:
ERROR: apport (pid 12399) Tue Jul 4 00:26:27 2017: called for pid 12251, signal 11, core limit 0
ERROR: apport (pid 12399) Tue Jul 4 00:26:27 2017: executable: /usr/sbin/apache2 (command line "/usr/sbin/apache2 -k start")
ERROR: apport (pid 12399) Tue Jul 4 00:26:27 2017: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 12399) Tue Jul 4 00:26:27 2017: apport: report /var/crash/_usr_sbin_apache2.0.crash already exists and unseen, doing nothing to avoid disk usage DoS
/var/log/kern.log:
Jul 4 02:08:39 localhost kernel: [ 2.667815] ppdev: user-space parallel port driver
Jul 4 02:08:39 localhost kernel: [ 2.691111] Request for unknown module key 'Magrathea: Glacier signing key: d120c47c14beb62ead6703d41712cc110575d297' err -11
Jul 4 02:08:39 localhost kernel: [ 2.716583] Request for unknown module key 'Magrathea: Glacier signing key: d120c47c14beb62ead6703d41712cc110575d297' err -11
Jul 4 02:08:39 localhost kernel: [ 2.717334] Request for unknown module key 'Magrathea: Glacier signing key: d120c47c14beb62ead6703d41712cc110575d297' err -11
Jul 4 02:08:40 localhost kernel: [ 5.345061] audit: type=1400 audit(1499148520.484:8): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/874/status" pid=874 comm="mysqld" requeste$
Jul 4 02:08:40 localhost kernel: [ 5.345262] audit: type=1400 audit(1499148520.484:9): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=874 comm="mysqld"$
Jul 4 02:08:40 localhost kernel: [ 5.345373] audit: type=1400 audit(1499148520.484:10): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/874/status" pid=874 comm="mysqld" request$
Jul 4 02:08:40 localhost kernel: [ 5.391287] random: nonblocking pool is initialized
Jul 4 02:08:40 localhost kernel: [ 5.577297] Request for unknown module key 'Magrathea: Glacier signing key: d120c47c14beb62ead6703d41712cc110575d297' err -11
Jul 4 02:10:10 localhost kernel: [ 95.097387] perf interrupt took too long (2626 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
Jul 4 02:26:07 localhost kernel: [ 1052.647086] audit: type=1400 audit(1499149567.761:11): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1445/status" pid=1445 comm="mysqld" reque$
Jul 4 02:26:07 localhost kernel: [ 1052.647352] audit: type=1400 audit(1499149567.761:12): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=1445 comm="mysql$
Jul 4 02:26:07 localhost kernel: [ 1052.647513] audit: type=1400 audit(1499149567.761:13): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1445/status" pid=1445 comm="mysqld" reque$
Jul 4 02:26:23 localhost kernel: [ 1067.895962] audit: type=1400 audit(1499149583.008:14): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1446/status" pid=1446 comm="mysqld" reque$
Jul 4 02:26:23 localhost kernel: [ 1067.896241] audit: type=1400 audit(1499149583.012:15): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=1446 comm="mysql$
Jul 4 02:26:23 localhost kernel: [ 1067.896340] audit: type=1400 audit(1499149583.012:16): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1446/status" pid=1446 comm="mysqld" reque$
Jul 4 02:31:19 localhost kernel: [ 1364.640301] perf interrupt took too long (5248 > 5000), lowering kernel.perf_event_max_sample_rate to 25000
Jul 4 02:37:26 localhost kernel: [ 1731.575398] audit: type=1400 audit(1499150246.686:17): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1540/status" pid=1540 comm="mysqld" reque$
Jul 4 02:37:26 localhost kernel: [ 1731.575508] audit: type=1400 audit(1499150246.686:18): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=1540 comm="mysql$
Jul 4 02:37:26 localhost kernel: [ 1731.575596] audit: type=1400 audit(1499150246.686:19): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1540/status" pid=1540 comm="mysqld" reque$
Jul 4 02:42:49 localhost kernel: [ 2054.276362] perf interrupt took too long (10122 > 10000), lowering kernel.perf_event_max_sample_rate to 12500
Jul 4 04:00:02 localhost kernel: [ 6687.106794] perf interrupt took too long (20184 > 20000), lowering kernel.perf_event_max_sample_rate to 6250
将很快获得更多信息。
答案 0 :(得分:0)
转到" wp-config.php"并设置" WP_DEBUG"如下例所示为真:
define( 'WP_DEBUG', true );
现在刷新前端和后端页面,以便能够看到PHP错误。
您还可以转到管理区域,设置,永久链接,然后再次点击"保存"按钮。这将覆盖.htaccess文件。
您可以安装日志服务,在google上搜索logly或sentry。那些也可能有所帮助。
答案 1 :(得分:0)
我今天注意到我的服务器正在报告Apache的可用更新。我有点困惑,因为'apache2 -v'在此次更新之前和之后都显示了2.4.27。但不管它解决了我的问题。
或许与CVE-2017-9789有关。