我正在使用 ioncube/zend 运行 php 脚本。
所有核心都达到 100%,并且系统开始累积负载。
所有 httpd 进程都处于 R(正在读取状态),看起来它们正在读取某些内容。我必须重新启动 apache 才能暂时修复此问题。
此外,domain.com/server-status 未显示任何 CPU 使用率高的 php 脚本。
PHP 5.6.29 (命令行)
Ioncube 加载器版本 6.0.8
阿帕奇/2.2.15
top - 04:25:25 up 1:33, 1 user, load average: 6.15, 6.27, 4.63
Tasks: 256 total, 6 running, 236 sleeping, 13 stopped, 1 zombie
Cpu(s): 96.0%us, 3.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.1%si, 0.2%st
Mem: 8191292k total, 2068300k used, 6122992k free, 28088k buffers
Swap: 0k total, 0k used, 0k free, 940004k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1534 apache 20 0 492m 23m 8176 R 79.1 0.3 7:43.32 httpd
1399 apache 20 0 492m 22m 7596 R 78.5 0.3 13:33.11 httpd
22154 apache 20 0 492m 22m 7556 R 77.1 0.3 13:27.89 httpd
1339 apache 20 0 492m 23m 8328 R 74.5 0.3 9:04.79 httpd
当我运行 strace -fcp 1534 10 秒时,我在 gettimeofday 上得到了 285273 个调用
[root@centos-8gb-lon1-01 ~]# strace -fcp 1534
Process 1534 attached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000823 0 285273 gettimeofday
------ ----------- ----------- --------- --------- ----------------
100.00 0.000823 285273 total
我还得到了 strace -p 1534
gettimeofday({1484299975, 598212}, NULL) = 0
gettimeofday({1484299975, 598255}, NULL) = 0
gettimeofday({1484299975, 598318}, NULL) = 0
gettimeofday({1484299975, 598362}, NULL) = 0
gettimeofday({1484299975, 598401}, NULL) = 0
gettimeofday({1484299975, 598442}, NULL) = 0
gettimeofday({1484299975, 598484}, NULL) = 0
gettimeofday({1484299975, 598524}, NULL) = 0
gettimeofday({1484299975, 598564}, NULL) = 0
gettimeofday({1484299975, 598603}, NULL) = 0
gettimeofday({1484299975, 598640}, NULL) = 0
gettimeofday({1484299975, 598677}, NULL) = 0
知道如何解决此问题吗?谢谢