0

I have two small sites using the latest WordPress version installed on an Nginx server with PHP 8.0 (FPM).

The server has occasional CPU load at random times of the day and the logs show multiple errors indicating a failure when connecting to the upstream on both of the sites and unknown named parameter error on one of the sites.

Upstream Error (on both sites):

2021/06/14 12:59:16 [error] 25666#25666: *3699 connect() failed (111: Connection refused) while connecting to upstream, client: 123.456.789.012, server: example.com, request: "POST /wp-comments-post.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:8010", host: "example.com", referrer: "https://example.com/hello-world/"
2021/06/14 12:59:30 [error] 25666#25666: *3709 connect() failed (111: Connection refused) while connecting to upstream, client: 123.456.789.012, server: example.com, request: "GET /wp-json/wp/v2/pages?per_page=100&exclude=26&parent_exclude=26&orderby=menu_order&order=asc&_fields=id,title,parent&context=edit&_locale=user HTTP/1.1", upstream: "fastcgi://127.0.0.1:8010", host: "example.com", referrer: "https://example.com/wp-admin/post.php?post=26&action=edit"
2021/06/14 12:59:48 [error] 25666#25666: *3717 connect() failed (111: Connection refused) while connecting to upstream, client: 123.456.789.012, server: example.com, request: "POST /wp-admin/post.php?post=26&action=edit&meta-box-loader=1&meta-box-loader-nonce=f25ba18d0d&_locale=user HTTP/1.1", upstream: "fastcgi://127.0.0.1:8010", host: "example.com", referrer: "https://example.com/wp-admin/post.php?post=26&action=edit"
2021/06/14 13:01:11 [error] 25666#25666: *3742 connect() failed (111: Connection refused) while connecting to upstream, client: 123.456.789.012, server: example.com, request: "POST /wp-cron.php?doing_wp_cron=1623672070.8921670913696289062500 HTTP/1.1", upstream: "fastcgi://127.0.0.1:8010", host: "example.com", referrer: "https://example.com/wp-cron.php?doing_wp_cron=1623672070.8921670913696289062500"

Unknown named parameter Error (on one of the sites):

PHP message: PHP Fatal error:  Uncaught Error: Unknown named parameter $tasks_meta_id in /home/example2/public_html/wp-includes/class-wp-hook.php

What is causing the above errors and how can I fix it?

4
  • Try reverting back to php 7.4. If I remember correctly wordpress still not 100% ready for php 8, plus a lot of plugins are also not ready for php 8. For now try switching back to php 7.4 and keep a lookout for any recurring errors. – Buttered_Toast Jun 14 at 14:07
  • Agreed - a little early to be jumping to PHP8. – jdm2112 Jun 14 at 15:54
  • This is likely less of a PHP8 specific issue, and more a configuration/setup issue. Here's another request that's quite similar to this: serverfault.com/questions/317393/… – Paul G. Jun 14 at 16:02
  • I switched the PHP to v7.4 just now and the error persisted. Will try out the approach shown in the ServerFault link provide by @PaulG. – AndrewL64 Jun 14 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.