我的服务器内存不足并调用了 oom killer,我非常希望得到有关原因的建议。
除了 GCP 操作代理内存使用量约为 1GB 以外,对我来说一切正常。
2024-08-31T03:32:04.686249+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.292035] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name
2024-08-31T03:32:04.686293+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.531175] [ 589] 0 589 455590 5613 348160 0 0 google_cloud_op
2024-08-31T03:32:04.686294+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.541342] [ 591] 0 591 310198 2641 126976 0 -999 google_guest_ag
2024-08-31T03:32:04.686294+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.551363] [ 592] 0 592 311262 3032 131072 0 0 google_osconfig
我将很感激任何建议,因为这不是我可以重现的错误。
有 30 个 php-fpm 进程(这是我设置的进程数)和 5 个 apache 进程。
2024-08-31T03:32:04.179692+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.337042] php-fpm8.1 invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=0
2024-08-31T03:32:04.682468+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.348768] CPU: 0 PID: 45778 Comm: php-fpm8.1 Not tainted 6.1.0-23-cloud-amd64 #1 Debian 6.1.99-1
2024-08-31T03:32:04.682636+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.358398] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
2024-08-31T03:32:04.683342+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.368643] Call Trace:
2024-08-31T03:32:04.683371+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.371878] <TASK>
2024-08-31T03:32:04.683386+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.374240] dump_stack_lvl+0x44/0x5c
2024-08-31T03:32:04.683387+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.378306] dump_header+0x4a/0x211
2024-08-31T03:32:04.683389+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.382394] oom_kill_process.cold+0xb/0x10
2024-08-31T03:32:04.683390+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.386974] out_of_memory+0x1fd/0x4c0
2024-08-31T03:32:04.683391+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.391068] __alloc_pages_slowpath.constprop.0+0xc6c/0xe30
2024-08-31T03:32:04.683391+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.521874] ? __alloc_pages_slowpath.constprop.0+0xd00/0xe30
2024-08-31T03:32:04.683392+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.528034] __alloc_pages+0x305/0x330
2024-08-31T03:32:04.683393+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.532111] folio_alloc+0x17/0x50
2024-08-31T03:32:04.683393+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.536250] __filemap_get_folio+0x155/0x340
2024-08-31T03:32:04.683411+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.541238] filemap_fault+0x139/0x910
2024-08-31T03:32:04.683412+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.545569] __do_fault+0x2e/0x80
2024-08-31T03:32:04.683413+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.549293] do_fault+0x1b9/0x410
2024-08-31T03:32:04.683414+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.552961] __handle_mm_fault+0x660/0xfa0
2024-08-31T03:32:04.683415+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.557640] handle_mm_fault+0xdb/0x2d0
2024-08-31T03:32:04.683416+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.563215] do_user_addr_fault+0x191/0x550
2024-08-31T03:32:04.683416+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.568194] exc_page_fault+0x70/0x170
2024-08-31T03:32:04.683435+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.572418] asm_exc_page_fault+0x22/0x30
2024-08-31T03:32:04.683436+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.576966] RIP: 0033:0x5630975fe1ad
2024-08-31T03:32:04.683437+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.580840] Code: Unable to access opcode bytes at 0x5630975fe183.
2024-08-31T03:32:04.683438+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.587769] RSP: 002b:00007fff20361200 EFLAGS: 00010202
2024-08-31T03:32:04.683439+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.593503] RAX: 00007f76a0b3c420 RBX: 00007f76a1bb37c8 RCX: 0000000000000000
2024-08-31T03:32:04.683440+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.601309] RDX: 00007f76a0ad29c0 RSI: 0000000000000000 RDI: 00007f76aa400040
2024-08-31T03:32:04.683452+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.609016] RBP: 00007f76aa414420 R08: 0000000000000042 R09: 00007f769dd3faa0
2024-08-31T03:32:04.683453+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.616657] R10: 00007f76acf41ac0 R11: 00007f76acf423c0 R12: 0000000000000000
2024-08-31T03:32:04.683454+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.624020] R13: 00007f76a0942460 R14: 00007f76aa4142f0 R15: 0000000047964ea0
2024-08-31T03:32:04.683454+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.631387] </TASK>
2024-08-31T03:32:04.683455+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.633930] Mem-Info:
2024-08-31T03:32:04.683455+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] active_anon:33000 inactive_anon:898360 isolated_anon:0
2024-08-31T03:32:04.683481+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] active_file:228 inactive_file:389 isolated_file:70
2024-08-31T03:32:04.683482+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] unevictable:0 dirty:0 writeback:0
2024-08-31T03:32:04.683483+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] slab_reclaimable:24356 slab_unreclaimable:9551
2024-08-31T03:32:04.683483+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] mapped:31054 shmem:32962 pagetables:4927
2024-08-31T03:32:04.683484+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] sec_pagetables:0 bounce:0
2024-08-31T03:32:04.683485+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] kernel_misc_reclaimable:0
2024-08-31T03:32:04.683485+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.636732] free:21377 free_pcp:0 free_cma:0
2024-08-31T03:32:04.683487+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.804389] Node 0 active_anon:132000kB inactive_anon:3593440kB active_file:64kB inactive_file:1244kB unevictable:0kB isolated(
anon):0kB isolated(file):780kB mapped:123516kB dirty:0kB writeback:0kB shmem:131848kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 1812480kB writeback_tmp:0kB kernel_stack:5792kB pagetables:19
708kB sec_pagetables:0kB all_unreclaimable? no
2024-08-31T03:32:04.683488+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.840108] Node 0 DMA free:14848kB boost:0kB min:256kB low:320kB high:384kB reserved_highatomic:0KB active_anon:0kB inactive_a
non:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15920kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
2024-08-31T03:32:04.683489+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.872203] lowmem_reserve[]: 0 2934 3886 3886 3886
2024-08-31T03:32:04.683490+00:00 ssd-lamp-2x-wp-aug24 kernel: [410583.877416] Node 0 DMA32 free:54592kB boost:0kB min:50824kB low:63528kB high:76232kB reserved_highatomic:0KB active_anon:64844k
B inactive_anon:2803064kB active_file:80kB inactive_file:588kB unevictable:0kB writepending:0kB present:3126072kB managed:3028156kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0k
B
2024-08-31T03:32:04.683491+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.032461] lowmem_reserve[]: 0 0 952 952 952
2024-08-31T03:32:04.683492+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.037446] Node 0 Normal free:15928kB boost:0kB min:16496kB low:20620kB high:24744kB reserved_highatomic:0KB active_anon:67156
kB inactive_anon:790416kB active_file:152kB inactive_file:1124kB unevictable:0kB writepending:0kB present:1048576kB managed:975400kB mlocked:0kB bounce:0kB free_pcp:428kB local_pcp:0kB free_cma
:0kB
2024-08-31T03:32:04.683493+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.068537] lowmem_reserve[]: 0 0 0 0 0
2024-08-31T03:32:04.683494+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.073463] Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB (U) 0*1024kB 1*2048kB (M) 3*4096kB (M) = 14848
kB
2024-08-31T03:32:04.683508+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.085966] Node 0 DMA32: 229*4kB (UME) 586*8kB (UME) 664*16kB (UME) 320*32kB (UME) 145*64kB (UE) 68*128kB (UME) 18*256kB (E) 9
*512kB (UE) 1*1024kB (M) 0*2048kB 0*4096kB = 54692kB
2024-08-31T03:32:04.683509+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.103713] Node 0 Normal: 953*4kB (UME) 594*8kB (UME) 226*16kB (UME) 105*32kB (UME) 26*64kB (UM) 0*128kB 0*256kB 0*512kB 0*102
4kB 0*2048kB 0*4096kB = 17204kB
2024-08-31T03:32:04.683510+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.118499] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
2024-08-31T03:32:04.683511+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.127959] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
2024-08-31T03:32:04.683512+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.136637] 33391 total pagecache pages
2024-08-31T03:32:04.683512+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.141065] 0 pages in swap cache
2024-08-31T03:32:04.683604+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.269572] Free swap = 0kB
2024-08-31T03:32:04.686212+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.272792] Total swap = 0kB
2024-08-31T03:32:04.686221+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.275914] 1047642 pages RAM
2024-08-31T03:32:04.686223+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.279288] 0 pages HighMem/MovableOnly
2024-08-31T03:32:04.686248+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.283449] 42913 pages reserved
2024-08-31T03:32:04.686248+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.287096] Tasks state (memory values in pages):
2024-08-31T03:32:04.686249+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.292035] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name
2024-08-31T03:32:04.686250+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.301114] [ 219] 0 219 14487 819 126976 0 -250 systemd-journal
2024-08-31T03:32:04.686250+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.310504] [ 238] 0 238 5961 297 65536 0 -1000 systemd-udevd
2024-08-31T03:32:04.686270+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.319876] [ 255] 998 255 4609 299 77824 0 0 systemd-network
2024-08-31T03:32:04.686272+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.329423] [ 370] 996 370 5208 613 81920 0 0 systemd-resolve
2024-08-31T03:32:04.686273+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.338976] [ 373] 997 373 22517 236 77824 0 0 systemd-timesyn
2024-08-31T03:32:04.686274+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.348872] [ 375] 0 375 2065 841 49152 0 0 haveged
2024-08-31T03:32:04.686275+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.357644] [ 390] 102 390 2019 169 57344 0 -900 dbus-daemon
2024-08-31T03:32:04.686276+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.367423] [ 405] 0 405 7733 2559 98304 0 0 networkd-dispat
2024-08-31T03:32:04.686276+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.378046] [ 407] 106 407 43612 8062 331776 0 0 redis-server
2024-08-31T03:32:04.686291+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.387516] [ 412] 0 412 55444 288 77824 0 0 rsyslogd
2024-08-31T03:32:04.686292+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.522135] [ 588] 0 588 723 22 45056 0 0 agetty
2024-08-31T03:32:04.686293+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.531175] [ 589] 0 589 455590 5613 348160 0 0 google_cloud_op
2024-08-31T03:32:04.686294+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.541342] [ 591] 0 591 310198 2641 126976 0 -999 google_guest_ag
2024-08-31T03:32:04.686294+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.551363] [ 592] 0 592 311262 3032 131072 0 0 google_osconfig
2024-08-31T03:32:04.686295+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.561093] [ 595] 0 595 734 22 40960 0 0 agetty
2024-08-31T03:32:04.686296+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.570595] [ 597] 0 597 27028 2435 110592 0 0 unattended-upgr
2024-08-31T03:32:04.686297+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.580434] [ 598] 105 598 390252 72994 815104 0 0 mariadbd
2024-08-31T03:32:04.686298+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.589957] [ 617] 995 617 77074 760 106496 0 0 polkitd
2024-08-31T03:32:04.686298+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.599073] [ 744] 0 744 3855 330 61440 0 -1000 sshd
2024-08-31T03:32:04.686300+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.607848] [ 760] 0 760 4174 268 69632 0 0 systemd-logind
2024-08-31T03:32:04.686301+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.617485] [ 782] 0 782 1005 63 49152 0 0 cron
2024-08-31T03:32:04.686301+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.626429] [ 1059] 100 1059 7220 2837 98304 0 0 exim4
2024-08-31T03:32:04.686329+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.635118] [ 1110] 0 1110 473703 5009 331776 0 0 google_cloud_op
2024-08-31T03:32:04.686330+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.769720] [ 1152] 0 1152 495251 12263 581632 0 0 otelopscol
2024-08-31T03:32:04.686331+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.778851] [ 1153] 0 1153 297611 3666 294912 0 0 fluent-bit
2024-08-31T03:32:04.686331+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.788751] [ 1472] 0 1472 70962 3245 274432 0 0 php-fpm8.1
2024-08-31T03:32:04.686332+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.798306] [ 2104] 0 2104 3425 764 65536 0 0 apache2
2024-08-31T03:32:04.686332+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.807166] [ 44643] 33 44643 305514 3063 249856 0 0 apache2
2024-08-31T03:32:04.686346+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.815855] [ 44644] 33 44644 305321 3555 245760 0 0 apache2
2024-08-31T03:32:04.686347+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.825116] [ 45455] 33 45455 104733 66522 778240 0 0 php-fpm8.1
2024-08-31T03:32:04.686348+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.835206] [ 45556] 33 45556 123425 65406 815104 0 0 php-fpm8.1
2024-08-31T03:32:04.686349+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.844776] [ 45705] 33 45705 103791 62700 761856 0 0 php-fpm8.1
2024-08-31T03:32:04.686349+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.855704] [ 45712] 33 45712 97488 33454 487424 0 0 php-fpm8.1
2024-08-31T03:32:04.686350+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.865693] [ 45714] 33 45714 305121 1441 245760 0 0 apache2
2024-08-31T03:32:04.686350+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.875509] [ 45742] 33 45742 95952 31831 475136 0 0 php-fpm8.1
2024-08-31T03:32:04.686351+00:00 ssd-lamp-2x-wp-aug24 kernel: [410584.885411] [ 45744] 33 45744 95952 31930 475136 0 0 php-fpm8.1
2024-08-31T03:32:04.686353+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.019042] [ 45746] 33 45746 103124 38774 532480 0 0 php-fpm8.1
2024-08-31T03:32:04.686353+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.028908] [ 45748] 33 45748 100048 36057 507904 0 0 php-fpm8.1
2024-08-31T03:32:04.686354+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.038459] [ 45750] 33 45750 304801 1794 245760 0 0 apache2
2024-08-31T03:32:04.686355+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.047318] [ 45778] 33 45778 98000 33877 491520 0 0 php-fpm8.1
2024-08-31T03:32:04.686356+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.056271] [ 45780] 33 45780 304641 1342 241664 0 0 apache2
2024-08-31T03:32:04.686375+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.065327] [ 45808] 33 45808 94932 30659 466944 0 0 php-fpm8.1
2024-08-31T03:32:04.686376+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.074356] [ 45810] 33 45810 91856 27409 442368 0 0 php-fpm8.1
2024-08-31T03:32:04.686377+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.083654] [ 45812] 33 45812 88272 24314 413696 0 0 php-fpm8.1
2024-08-31T03:32:04.686377+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.093087] [ 45814] 33 45814 87764 23647 409600 0 0 php-fpm8.1
2024-08-31T03:32:04.686378+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.102117] [ 45816] 33 45816 87760 23696 409600 0 0 php-fpm8.1
2024-08-31T03:32:04.686379+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.111071] [ 45818] 33 45818 87760 23651 409600 0 0 php-fpm8.1
2024-08-31T03:32:04.686392+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.120535] [ 45820] 33 45820 88276 24274 413696 0 0 php-fpm8.1
2024-08-31T03:32:04.686393+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.130811] [ 45822] 33 45822 103536 39226 536576 0 0 php-fpm8.1
2024-08-31T03:32:04.686393+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.141259] [ 45824] 33 45824 102942 38595 532480 0 0 php-fpm8.1
2024-08-31T03:32:04.686394+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.275568] [ 45826] 33 45826 100860 36573 516096 0 0 php-fpm8.1
2024-08-31T03:32:04.686396+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.285213] [ 45828] 33 45828 99799 35692 507904 0 0 php-fpm8.1
2024-08-31T03:32:04.686397+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.294594] [ 45830] 33 45830 99799 35661 507904 0 0 php-fpm8.1
2024-08-31T03:32:04.686398+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.304153] [ 45832] 33 45832 98187 33788 471040 0 0 php-fpm8.1
2024-08-31T03:32:04.686399+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.313612] [ 45834] 33 45834 97159 32977 462848 0 0 php-fpm8.1
2024-08-31T03:32:04.686399+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.322804] [ 45836] 33 45836 94550 30498 442368 0 0 php-fpm8.1
2024-08-31T03:32:04.686400+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.332181] [ 45838] 33 45838 94554 30199 442368 0 0 php-fpm8.1
2024-08-31T03:32:04.686401+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.342441] [ 45840] 33 45840 93526 28949 434176 0 0 php-fpm8.1
2024-08-31T03:32:04.686401+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.351636] [ 45842] 33 45842 91478 26920 417792 0 0 php-fpm8.1
2024-08-31T03:32:04.686420+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.361344] [ 45844] 33 45844 91478 26926 417792 0 0 php-fpm8.1
2024-08-31T03:32:04.686421+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.371078] [ 45846] 33 45846 89363 25328 401408 0 0 php-fpm8.1
2024-08-31T03:32:04.686421+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.380098] [ 45848] 33 45848 87315 23204 385024 0 0 php-fpm8.1
2024-08-31T03:32:04.686422+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.389907] [ 45850] 106 45850 43708 8133 319488 0 0 redis-server
2024-08-31T03:32:04.686423+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.523630] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/mar
iadb.service,task=mariadbd,pid=598,uid=105
2024-08-31T03:32:04.686423+00:00 ssd-lamp-2x-wp-aug24 kernel: [410585.541260] Out of memory: Killed process 598 (mariadbd) total-vm:1561008kB, anon-rss:291976kB, file-rss:0kB, shmem-rss:0kB, UI
D:105 pgtables:796kB oom_score_adj:0
2024-08-31T03:32:05.909071+00:00 ssd-lamp-2x-wp-aug24 systemd-networkd[255]: ens4: Could not set DHCPv4 address: Connection timed out
2024-08-31T03:32:05.944539+00:00 ssd-lamp-2x-wp-aug24 google_cloud_ops_agent_diagnostics[589]: 2024/08/31 03:32:05 rpc error: code = DeadlineExceeded desc = context deadline exceeded
2024-08-31T03:32:05.964966+00:00 ssd-lamp-2x-wp-aug24 systemd-networkd[255]: ens4: Failed
2024-08-31T03:32:05.966881+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: mariadb.service: A process of this unit has been killed by the OOM killer.
2024-08-31T03:32:06.127762+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: mariadb.service: Main process exited, code=killed, status=9/KILL
2024-08-31T03:32:06.142706+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: mariadb.service: Failed with result 'oom-kill'.
2024-08-31T03:32:06.142923+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: mariadb.service: Consumed 10min 28.708s CPU time.
2024-08-31T03:32:06.144389+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: Starting gce-workload-cert-refresh.service - GCE Workload Certificate refresh...
2024-08-31T03:32:06.148026+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: Starting google-oslogin-cache.service - NSS cache refresh...
2024-08-31T03:32:06.690880+00:00 ssd-lamp-2x-wp-aug24 google_oslogin_nss_cache[45854]: oslogin_cache_refresh[45854]: Refreshing passwd entry cache
2024-08-31T03:32:06.691300+00:00 ssd-lamp-2x-wp-aug24 oslogin_cache_refresh[45854]: Refreshing passwd entry cache
2024-08-31T03:32:06.734337+00:00 ssd-lamp-2x-wp-aug24 google_oslogin_nss_cache[45854]: oslogin_cache_refresh[45854]: Refreshing group entry cache
2024-08-31T03:32:06.734548+00:00 ssd-lamp-2x-wp-aug24 oslogin_cache_refresh[45854]: Refreshing group entry cache
2024-08-31T03:32:06.888927+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: google-oslogin-cache.service: Deactivated successfully.
2024-08-31T03:32:06.889168+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: Finished google-oslogin-cache.service - NSS cache refresh.
2024-08-31T03:32:06.925267+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: 2024-08-31T03:32:06.917Z#011error#011exporterhelper/queue_sender.go:101#011Exporting failed. Dropping data.#011{"error":
"rpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: Points must be written in order. One or more of the points specified had an older end time than the most r
ecent point.: gce_instance{instance_id:5773321142887762676,zone:europe-west2-c} timeSeries[0-2]: agent.googleapis.com/agent/request_count{response_code:200}\nerror details: name = Unknown desc
= total_point_count:3 errors:{status:{code:3} point_count:3}", "dropped_items": 3}
2024-08-31T03:32:06.927769+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/exporterhelper.newQueueSender.func1
2024-08-31T03:32:06.927869+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/exporterhelper/queue_sender.go:101
2024-08-31T03:32:06.927910+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/internal/queue.(*boundedMemoryQueue[...]).Consume
2024-08-31T03:32:06.927946+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/internal/queue/bounded_memory_queue.go:52
2024-08-31T03:32:06.927975+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/internal/queue.(*Consumers[...]).Start.func1
2024-08-31T03:32:06.928005+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/internal/queue/consumers.go:43
2024-08-31T03:32:06.928071+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: 2024-08-31T03:32:06.917Z#011error#011exporterhelper/queue_sender.go:101#011Exporting failed. Dropping data.#011{"error":
"rpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: Points must be written in order. One or more of the points specified had an older end time than the most r
ecent point.: gce_instance{zone:europe-west2-c,instance_id:5773321142887762676} timeSeries[0-3]: agent.googleapis.com/agent/monitoring/point_count{status:OK}\nerror details: name = Unknown des
c = total_point_count:4 errors:{status:{code:3} point_count:4}", "dropped_items": 4}
2024-08-31T03:32:06.928172+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/exporterhelper.newQueueSender.func1
2024-08-31T03:32:06.928210+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/exporterhelper/queue_sender.go:101
2024-08-31T03:32:06.928242+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/internal/queue.(*boundedMemoryQueue[...]).Consume
2024-08-31T03:32:06.928281+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/internal/queue/bounded_memory_queue.go:52
2024-08-31T03:32:06.928318+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/internal/queue.(*Consumers[...]).Start.func1
2024-08-31T03:32:06.928369+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/internal/queue/consumers.go:43
2024-08-31T03:32:06.962333+00:00 ssd-lamp-2x-wp-aug24 gce_workload_cert_refresh[45853]: 2024/08/31 03:32:06: Done
2024-08-31T03:32:06.970206+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: gce-workload-cert-refresh.service: Deactivated successfully.
2024-08-31T03:32:06.971615+00:00 ssd-lamp-2x-wp-aug24 systemd[1]: Finished gce-workload-cert-refresh.service - GCE Workload Certificate refresh.
2024-08-31T03:32:09.653676+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: 2024-08-31T03:32:09.652Z#011error#011exporterhelper/queue_sender.go:101#011Exporting failed. Dropping data.#011{"error":
"rpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: One or more points were written more frequently than the maximum sampling period configured for the metric
.: gce_instance{instance_id:5773321142887762676,zone:europe-west2-c} timeSeries[0-199]: agent.googleapis.com/cpu/load_15m{}\nerror details: name = Unknown desc = total_point_count:200 success
_point_count:197 errors:{status:{code:9} point_count:3}\nrpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: One or more points were written more frequently
than the maximum sampling period configured for the metric.: gce_instance{instance_id:5773321142887762676,zone:europe-west2-c} timeSeries[0-199]: agent.googleapis.com/processes/disk/read_bytes_
count{owner:redis,command:redis-server,pid:45850,process:all,command_line:redis-rdb-bgsave 127.0.0.1:6379}\nerror details: name = Unknown desc = total_point_count:200 success_point_count:123
errors:{status:{code:9} point_count:77}\nrpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: One or more points were written more frequently than the maximum
sampling period configured for the metric.: gce_instance{zone:europe-west2-c,instance_id:5773321142887762676} timeSeries[0-27]: agent.googleapis.com/interface/errors{direction:rx,device:lo}\ne
rror details: name = Unknown desc = total_point_count:28 errors:{status:{code:9} point_count:28}", "dropped_items": 828}
2024-08-31T03:32:09.654223+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/exporterhelper.newQueueSender.func1
2024-08-31T03:32:09.654305+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/exporterhelper/queue_sender.go:101
2024-08-31T03:32:09.654359+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/internal/queue.(*boundedMemoryQueue[...]).Consume
2024-08-31T03:32:09.654414+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/internal/queue/bounded_memory_queue.go:52
2024-08-31T03:32:09.654465+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: go.opentelemetry.io/collector/exporter/internal/queue.(*Consumers[...]).Start.func1
2024-08-31T03:32:09.654542+00:00 ssd-lamp-2x-wp-aug24 otelopscol[1152]: #011/root/go/pkg/mod/go.opentelemetry.io/collector/exporter@v0.102.0/internal/queue/consumers.go:43
最佳答案
1
看起来我犯了一个错误。每个进程的实际内存使用量是 RSS 列 x 4kb。
所以我的内存使用情况是:
不是 php-fpm – 600mb
php-fpm-4GB
每个进程的 php-fpm – 4000/30 = 136mb
计算 pm.max_children (总 RAM – 1gb / 进程大小)
3000/136 = 22
编辑 php-fpm
须藤纳米 /etc/php/8.1/fpm/pool.d/www.conf
pm = 动态
下午.max_children = 22
pm.max_requests = 1000
希望不会再次崩溃!
2
-
当然:sudo service php8.1-fpm restart
– -
如果内存计算真的那么简单——那么我们就不需要 OOM Killer 了。
–
|
|