gpt4 book ai didi

php7.0-fpm高负载cpu

转载 作者:太空宇宙 更新时间:2023-11-04 12:22:59 25 4
gpt4 key购买 nike

我有一个错误。他是随机出现的。工作可能 2-3 天是正常的,但在某些事件后开始高负载 cpu screen

出现时我在 php-fpm 上执行 strace

    --- 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)

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com