I was plauged with these two errors on my PS4 and tried so many things to fix them to no avail.

I figured out that my issue was being on WiFi since an ethernet connection solved the issue. I was ready to run ethernet through my floors until I tried one last thing.

I changed my security type on the WiFi from WPA/WPA2-PSK (TKIP-AES) to WPA-PSK (TKIP). I now have zero lag and no disconnects or errors.