我有个虫子。他随机出现。5月2-3日正常工作,但在某些事件后,启动高负载cpu
screen
当php fpm出现时,我确实会跟踪它

    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=695, si_uid=33, si_status=0, ...} ---
getpid()                                = 10154
write(8, "C", 1)                        = -1 EAGAIN (Resource temporarily unavailable)
rt_sigreturn()                          = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = 707
clock_gettime(CLOCK_MONOTONIC, {760605, 823753717}) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=701, si_uid=33, si_status=0, si_utime=0, si_stime=0} ---
write(8, "C", 1)                        = -1 EAGAIN (Resource temporarily unavailable)
rt_sigreturn()                          = 140034873437968
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=698, si_uid=33, si_status=0, si_utime=0, si_stime=0} ---
write(8, "C", 1)                        = -1 EAGAIN (Resource temporarily unavailable)
rt_sigreturn()                          = 140034873437968
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED, NULL) = 32743
clock_gettime(CLOCK_MONOTONIC, {760605, 824399822}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = 708
clock_gettime(CLOCK_MONOTONIC, {760605, 825037147}) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED, NULL) = 32744
clock_gettime(CLOCK_MONOTONIC, {760605, 825227552}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=702, si_uid=33, si_status=0, si_utime=0, si_stime=0} ---
getpid()                                = 10154
write(8, "C", 1)                        = -1 EAGAIN (Resource temporarily unavailable)
rt_sigreturn()                          = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = 710
clock_gettime(CLOCK_MONOTONIC, {760605, 827677677}) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED, NULL) = 32747
clock_gettime(CLOCK_MONOTONIC, {760605, 827886974}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = 711
clock_gettime(CLOCK_MONOTONIC, {760605, 828755896}) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED, NULL) = 32748
clock_gettime(CLOCK_MONOTONIC, {760605, 828921349}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = 712
clock_gettime(CLOCK_MONOTONIC, {760605, 829779218}) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED, NULL) = 32749
clock_gettime(CLOCK_MONOTONIC, {760605, 829951780}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = 713
clock_gettime(CLOCK_MONOTONIC, {760605, 830916994}) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED, NULL) = 32750
clock_gettime(CLOCK_MONOTONIC, {760605, 831123550}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=707, si_uid=33, si_status=0, si_utime=0, si_stime=0} ---
getpid()                                = 10154
write(8, "C", 1)                        = -1 EAGAIN (Resource temporarily unavailable)
rt_sigreturn()                          = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=708, si_uid=33, si_status=0, si_utime=0, si_stime=0} ---
getpid()                                = 10154
write(8, "C", 1)                        = -1 EAGAIN (Resource temporarily unavailable)
rt_sigreturn()                          = 56
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5c688b6a10) = ? ERESTARTNOINTR (To be restarted)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=710, si_uid=33, si_status=0, si_utime=0, si_stime=0} ---

更新内核不能解决这个问题?
仅帮助重新启动php fpm进程
你能给我什么建议?谢谢

最佳答案

这是因为你的插座,当他不能写的时候,它正在试着写:

write(8, "C", 1)                        = -1 EAGAIN (Resource temporarily unavailable)
rt_sigreturn()                          = 56

由于没有任何方法可以更改源代码,因此需要降级php版本,看看它是否能够在没有这个套接字问题的情况下完成任务。
查看更多:
Why STRACE shows EAGAIN (Resource temporarily unavailable)

关于php - php7.0-fpm高负载CPU,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45522547/

10-11 05:28