Instance Logs are filled with apub warnings - eviltoast

I’m helping with a highly federated instance, I’m trying to track down an error but the logs are rolling over roughly every hour after being flooded with apub warnings.

{"log":"\u001b[2m2023-07-17T00:50:07.309563Z\u001b[0m \u001b[33m WARN\u001b[0m \u001b[2mactivitypub_federation::activity_queue\u001b[0m\u001b[2m:\u001b[0m Queueing activity https://**********/activities/announce/4e5ea7d8-5d06-4c35-8c83-843484ba59b9 to https://**********/inbox for retry after connection failure: Request error: error sending request for url (https://********/inbox): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1919: (Hostname mismatch).  Sleeping for 60s and trying again\n","stream":"stdout","time":"2023-07-17T00:50:07.309720924Z"}

I assume these are due to sites being offline or otherwise inactive. Looking at the database I see that we have hundreds of instances that haven’t received an update in over a month now. How can I stop these from flooding out logs so I can find actual errors.

Can I just remove the problem instances from the instance table? Would that stop the activity pub requests? It seems like we’re sending them to reach the inbox, which is failing for various reasons.