Помогите определить причину остановки выполнения PHP скрипта

Рейтинг: 0Ответов: 0Опубликовано: 12.02.2023

Мой скрипт на PHP7.2 запускается в консольном режиме, в работе использует mysql и memcached, активно подключается по сети. Время выполнения достаточно долгое, от минуты до нескольких часов. Постоянно запущены масса экземпляров скрипта и я наблюдаю проблему, что некоторые из них останавливаются без видимых на то причин. В логах никакой информации нет. Мне удалось подключиться к одному из таких процессов по strace, ниже приведу код вывода. Скрипт сначала "завис" на SIG_IGN (Timeout) - я получил массу таких сообщений.

clone(child_stack=0x7fc065ffed70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tid=[1955360], tls=0x7fc065fff700, child_tidptr=0x7fc065fff9d0) = 1955360
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc06b724090}, NULL, 8) = 0
poll([{fd=7, events=POLLIN}, {fd=5, events=POLLIN}], 2, 1) = 0 (Timeout)
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc06b724090}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc06b724090}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc06b724090}, NULL, 8) = 0
poll([{fd=7, events=POLLIN}, {fd=5, events=POLLIN}], 2, 1) = 0 (Timeout)
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc06b724090}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc06b724090}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc06b724090}, NULL, 8) = 0
poll([{fd=7, events=POLLIN}, {fd=5, events=POLLIN}], 2, 1) = 0 (Timeout)

А затем просто остановил свое выполнение.

connect(3, {sa_family=AF_INET, sin_port=htons(11211), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=3, events=POLLOUT}], 1, 4000) = 1 ([{fd=3, revents=POLLOUT}])
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
sendto(3, "set e_50684 4 86400 459\r\na:19:{s"..., 486, MSG_NOSIGNAL, NULL, 0) = 486
recvfrom(3, 0x55b1e467cdf8, 8196, MSG_NOSIGNAL, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}], 1, 5000)  = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "STORED\r\n", 8196, MSG_NOSIGNAL, NULL, NULL) = 8
sendto(3, "quit\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6
shutdown(3, SHUT_WR)                    = 0
shutdown(3, SHUT_RD)                    = -1 ENOTCONN (Transport endpoint is not connected)
close(3)                                = 0
close(2)                                = 0
close(1)                                = 0
close(0)                                = 0
sendto(5, "\1\0\0\0\1", 5, MSG_DONTWAIT, NULL, 0) = 5
close(5)                                = 0
munmap(0x7fc066200000, 2097152)         = 0
munmap(0x7fc066400000, 2097152)         = 0
munmap(0x7fc066b9e000, 125584)          = 0
munmap(0x7fc066b6a000, 209872)          = 0
munmap(0x7fc066d8a000, 74296)           = 0
munmap(0x7fc066bbd000, 107752)          = 0
munmap(0x7fc066d9d000, 37360)           = 0
munmap(0x7fc066d2e000, 94232)           = 0
munmap(0x7fc066d46000, 267624)          = 0
munmap(0x7fc066c10000, 1171400)         = 0
munmap(0x7fc066bed000, 139872)          = 0
munmap(0x7fc066da7000, 53768)           = 0
munmap(0x7fc066db5000, 41520)           = 0
munmap(0x7fc066dc0000, 28880)           = 0
munmap(0x7fc066e51000, 20720)           = 0
munmap(0x7fc066f19000, 16592)           = 0
munmap(0x7fc066dc8000, 24784)           = 0
munmap(0x7fc066dcf000, 102736)          = 0
munmap(0x7fc066e57000, 57880)           = 0
munmap(0x7fc066f1e000, 16600)           = 0
munmap(0x7fc066f23000, 41288)           = 0
munmap(0x7fc066e19000, 225376)          = 0
munmap(0x7fc066de9000, 194944)          = 0
munmap(0x7fc06748d000, 28888)           = 0
munmap(0x7fc066e66000, 731576)          = 0
munmap(0x7fc066f2e000, 45264)           = 0
munmap(0x7fc066f3a000, 283808)          = 0
munmap(0x7fc066f80000, 37080)           = 0
munmap(0x7fc066fb3000, 149896)          = 0
munmap(0x7fc067068000, 79208)           = 0
munmap(0x7fc068028000, 94520)           = 0
munmap(0x7fc067495000, 49392)           = 0
munmap(0x7fc0674a2000, 503560)          = 0
munmap(0x7fc06747d000, 61648)           = 0
munmap(0x7fc06717e000, 3138280)         = 0
munmap(0x7fc06751d000, 274768)          = 0
munmap(0x7fc067a51000, 53496)           = 0
munmap(0x7fc067a5f000, 20688)           = 0
munmap(0x7fc067a65000, 119000)          = 0
munmap(0x7fc0679e7000, 428936)          = 0
munmap(0x7fc0679a0000, 288392)          = 0
munmap(0x7fc0678e1000, 778256)          = 0
munmap(0x7fc0678cc000, 82768)           = 0
munmap(0x7fc06784b000, 525360)          = 0
munmap(0x7fc0677e1000, 430456)          = 0
munmap(0x7fc0677b3000, 184480)          = 0
munmap(0x7fc0677aa000, 32792)           = 0
munmap(0x7fc06766d000, 1297720)         = 0
munmap(0x7fc0675c4000, 688192)          = 0
munmap(0x7fc0675b3000, 68488)           = 0
munmap(0x7fc067589000, 168616)          = 0
munmap(0x7fc067583000, 20744)           = 0
munmap(0x7fc06757b000, 28800)           = 0
munmap(0x7fc067561000, 102768)          = 0
munmap(0x7fc068d7f000, 69840)           = 0
munmap(0x7fc067a83000, 5747848)         = 0
munmap(0x7fc067fff000, 166152)          = 0
munmap(0x7fc06707c000, 1055960)         = 0
munmap(0x7fc066fd8000, 583752)          = 0
munmap(0x7fc068040000, 174624)          = 0
munmap(0x7fc068d91000, 106720)          = 0
munmap(0x7fc068cea000, 595528)          = 0
munmap(0x7fc068cc1000, 164080)          = 0
munmap(0x7fc068c80000, 127920)          = 0
munmap(0x7fc068c12000, 447904)          = 0
munmap(0x7fc068bff000, 73744)           = 0
munmap(0x7fc068bb2000, 312128)          = 0
munmap(0x7fc068b5c000, 351048)          = 0
munmap(0x7fc068b4b000, 66024)           = 0
munmap(0x7fc068b3d000, 53352)           = 0
munmap(0x7fc0687e5000, 1922664)         = 0
munmap(0x7fc068ca0000, 131096)          = 0
munmap(0x7fc0689bb000, 1579272)         = 0
munmap(0x7fc0687ae000, 221976)          = 0
munmap(0x7fc068774000, 233592)          = 0
munmap(0x7fc0686f0000, 537024)          = 0
munmap(0x7fc068613000, 904640)          = 0
munmap(0x7fc0685e2000, 196696)          = 0
munmap(0x7fc0685d3000, 58344)           = 0
munmap(0x7fc0685b6000, 115688)          = 0
munmap(0x7fc068571000, 280472)          = 0
munmap(0x7fc06854e000, 139624)          = 0
munmap(0x7fc068418000, 1268992)         = 0
munmap(0x7fc068402000, 86568)           = 0
munmap(0x7fc0683fb000, 24592)           = 0
munmap(0x7fc0683ef000, 45648)           = 0
munmap(0x7fc06835c000, 598928)          = 0
munmap(0x7fc068259000, 46632)           = 0
munmap(0x7fc0681cf000, 316456)          = 0
munmap(0x7fc06822f000, 167984)          = 0
munmap(0x7fc06827e000, 227944)          = 0
munmap(0x7fc06821d000, 71896)           = 0
munmap(0x7fc0682b6000, 676080)          = 0
munmap(0x7fc068265000, 99376)           = 0
munmap(0x7fc068dc1000, 24744)           = 0
munmap(0x7fc0680a6000, 1216056)         = 0
munmap(0x7fc06806b000, 238280)          = 0
munmap(0x7fc06968b000, 16592)           = 0
munmap(0x7fc068dc8000, 45264)           = 0
munmap(0x7fc069604000, 32976)           = 0
munmap(0x7fc068dac000, 76840)           = 0
munmap(0x7fc069690000, 57616)           = 0
munmap(0x7fc06960d000, 115880)          = 0
munmap(0x7fc068dd4000, 268640)          = 0
munmap(0x7fc06c089000, 25408)           = 0
munmap(0x7fc066b3a000, 196608)          = 0
munmap(0x7fc069736000, 595464)          = 0
munmap(0x7fc066000000, 2097152)         = 0
munmap(0x7fc065400000, 2097152)         = 0
munmap(0x7fc069400000, 2097152)         = 0
munmap(0x7fc066a48000, 659456)          = 0
munmap(0x7fc0697c8000, 135168)          = 0
exit_group(0)                           = ?
+++ exited with 0 +++

Помогите установить причину?

Ответы

Ответов пока нет.