Error: java.io.IOException: Invalid argument (sendto failed)

I’ve finally found out what was causing all my strife.

Although I had blocked all my devices connected to wifi to check if one of those was the offender, I forgot that I had a couple of arduinos with ethernet shields doing various home-automation tasks and communicating via MQTT.
One of these was the problem and unplugging the ethernet cable fixed things.
When I rebooted the Pi, this arduino showed up on wireshark flagged red.

It’s confusing that I had updated the code in these back in the middle of February but only noticed the slow problem in the last couple of weeks.

The reason for the update was I password-protected my MQTT and couldn’t do all the devices OTA so it was a bit of a job. I think when I recompiled the code for these two, it used updated libraries and one of these newer libraries had a bug in it.
I may have used older libraries by mistake. Possibly it’s something else I’ve done that’s amiss. I need to look into it.

I guess this isn’t really an openHAB problem but if people have problems with their system being slow, it may be worth using wire shark to check their network.

Thanks for everyone’s help.