PHP Fatal error allowed memory size
-
Greetings,
lately, I noticed my VPS server failing with errors such as 500. I have to restart nginx and php8.2-fpm services in order to restore the site to running state.
The VPS is 4 cores 4GB. WordPess only consumes 42mb out of memory at all times. Max memory limit for WP is 700mb. Max memory limit for PHP is 2000mb. Yet memory consumption for overall VPS doesn’t go above 1.2GB.
The error in question starts with series of PHP Fatal errrors, but according to my nginx logs it starts with this:
2024/07/27 08:57:40 [error] 162804#162804: *445 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 172.69.222.221, server: mp-performance.ae, request: "GET /wp-json/jetpack/v4/jitm?message_path=wp%3Awoocommerce_page_wc-admin%3Aadmin_notices&query=page%253Dwc-admin%252Cpath%253D%25252Fgoogle%25252Fdashboard&full_jp_logo_exists=false&_wpnonce=c934831b75 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:40 [error] 162804#162804: *450 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 172.69.222.220, server: mp-performance.ae, request: "GET /wp-json/wc-analytics/admin/notes?page=1&per_page=25&type=error%2Cupdate&status=unactioned&_locale=user HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:40 [error] 162804#162804: *456 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 172.69.222.221, server: mp-performance.ae, request: "GET /wp-json/wc/gla/mc/reports/programs?after=2023-07-01&before=2023-07-27&fields%5B0%5D=clicks&fields%5B1%5D=impressions&_locale=user HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:40 [error] 162804#162804: *453 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 172.69.222.220, server: mp-performance.ae, request: "GET /wp-json/wc/gla/jetpack/connected?_locale=user HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:40 [error] 162804#162804: *446 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 141.101.97.103, server: mp-performance.ae, request: "GET /wp-admin/admin-ajax.php?action=nasa_list_fonts_admin&fill= HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:40 [error] 162804#162804: *458 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 172.69.222.220, server: mp-performance.ae, request: "GET /wp-json/wc/gla/mc/target_audience?_locale=user HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:40 [error] 162804#162804: *455 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 172.69.222.221, server: mp-performance.ae, request: "GET /wp-json/wc/gla/mc/reports/programs?after=2024-07-01&before=2024-07-27&fields%5B0%5D=clicks&fields%5B1%5D=impressions&_locale=user HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:40 [error] 162805#162805: *457 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 172.69.222.220, server: mp-performance.ae, request: "GET /wp-json/wc/gla/mc/countries?continents=true&_locale=user HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard"
2024/07/27 08:57:47 [error] 162804#162804: *393 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 141.101.97.9, server: mp-performance.ae, request: "GET /wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.ae", referrer: "https://mp-performance.ae/wp-admin/admin.php?inner_page=edit&page=duplicator-pro-schedules"
2024/07/27 08:57:56 [error] 162804#162804: *464 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 4295229440 bytes) in /var/www/html/wordpress/wp-includes/theme.php on line 189" while reading response header from upstream, client: 162.158.163.226, server: mp-performance.ae, request: "GET /shop/?filter_make_model=a4-prestige&filter_make_brand=michelin,varta,castrol,brigdestone,bosch,wruth HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mp-performance.com", referrer: "https://mp-performance.com/shop/?filter_make_model=a4-prestige&filter_make_brand=michelin%2Cvarta%2Ccastrol%2Cbrigdestone%2Cbosch%2Cwruth%2Cdorman"Here’s system report from WP: https://gist.github.com/ubut12d/8108f4b9cdaae35908ce91dc1e4d9d89
Here’s fatal-error log when it occurs: https://gist.github.com/ubut12d/27180cb60360b8b6de2cf21fc0fae70d
I’m feeling tired off this issue, I look all over internet and many sites trying to trace this issue. Yet even with my large free RAM/memory the issue presists. Please help!
- You must be logged in to reply to this topic.