simple solution: php fpm out of memory, limit php processing power
pm = ondemand pm.max_children = 80 (here to control) * php max memory limit. pm.process_idle_timeout = 10s pm.max_requests = 200 memory_limit = 128M max_input_vars = 2000 upload_max_filesize = 64M post_max_size = 64M max_execution_time = 120
reduce php max_excution time top cuttoff the long running processes
s mentioned, the max_execution_time WordPress error appears after a plugin, theme, or WordPress update takes too long to run a PHP script.
hostinger php max execution time (sahared hosting 30 seconds)
php_value memory_limit 256M
php_value max_execution_time 60
my case 300 minutes or 5 minutes with midnight cron job.. // may be tht cuaused
kinsta php max execution time
Kinsta customers cannot alter the PHP timeout.
wpengine php max execution time
Default max_execution_time for scripts is set to 60 seconds.
This setting can only be decreased, and cannot be increased. If you are performing a task which will take over 60 seconds to complete, the task should be broken into smaller segments and run in batches.
Default max_execution_time for scripts is set to 60 seconds.
yoast seo causes php
godaddy php max execution time Managed WordPress
bluehost php max execution time
hostgator php max execution time
SiteGround hosting allows 120 seconds as a default value which should be sufficient in most cases.
2nd solution increase resource or upgrade server
increase memory to php or increase overall memory resources.
3rd rate limiting by nginx incase ddos
location is important here path to php script
checking for logs to find php fpm oom killer
nginx error log
only after php dead error php fpm sock failed and cloudlfare proixy bad gateway host error.
php fpm error log: increase number
WARNING: [pool www] server reached max_children setting (10), consider raising it |(on demand pool)
[05-Aug-2023 22:18:13] WARNING: [pool sarkari] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 18 total children
[05-Aug-2023 23:10:15] NOTICE: Terminating …
[05-Aug-2023 23:10:16] NOTICE: exiting, bye-bye! (dead here by oom killer)
[03-Aug-2023 05:48:40] NOTICE: Terminating …
[03-Aug-2023 05:48:40] NOTICE: exiting, bye-bye!
[03-Aug-2023 06:24:24] NOTICE: fpm is running, pid 101392
[03-Aug-2023 06:24:24] NOTICE: ready to handle connections
[03-Aug-2023 06:24:24] NOTICE: systemd monitor interval set to 10000ms
kernel log
Aug 5 23:10:15 murali kernel: [10234715.140947] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=php8.1-fpm.service,mems_allowed=0,global_oom,task_memcg=/system.slice/php8.1-fpm.service,task=php-fpm8.1,pid=310693,uid=33
Aug 5 23:10:15 murali kernel: [10234715.140962] Out of memory: Killed process 310693 (php-fpm8.1) total-vm:787640kB, anon-rss:161588kB, file-rss:2824kB, shmem-rss:102016kB, UID:33 pgtables:776kB oom_score_adj:0
Aug 9 05:12:38 murali kernel: [10515650.545250] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=mysql.service,mems_allowed=0,global_oom,task_memcg=/system.slice/php8.1-fpm.service,task=php-fpm8.1,pid=472715,uid=33
Aug 9 05:12:38 murali kernel: [10515650.545264] Out of memory: Killed process 472715 (php-fpm8.1) total-vm:919360kB, anon–rss:190496kB, file-rss:2904kB, shmem-rss:275388kB, UID:33 pgtables:1272kB oom_score_adj:0
190MB
update; as of 6th august 2023 satisfied with decreasing php max execution time 300 seconds to 120 seconds just like managed wordpress hosting providers like kinsta and wpengine and some shared hosting providers like hostingler.
9th august again invoked oomkiller memory 356mb per process total memory 3.83 but