Connecting to upstream failed

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?