I would certainly like to know too because the same thing keeps happening to me. I even went as far as doing a full restore (that took 44 hrs to complete) to try to get it to stop but its still doing it.
that is a different error, something else is happening to log you out.
This has been happening to me from about Feb 13 as well, i have tried every single thing people have suggested, looked at every setting and defaulted and undefaulted, got a new router, nothing has changed. I have no solution and nothing anyone has said has helped either.
The solution is to disable the PS Media Server service, turn off the console and powercycle your network equipment (router/modem). I also recommend that you regularly check for playstation firmware updates as well as enable UPNP in your router and forward all necessary ports. Occasionally, this problem is caused by DNS issues. If this is the case for you, which you can verify by pinging your dns host, try changing your dns servers to that of OPENDNS or GoogleDNS. Be sure to get your ISP issued dns incase u need to revert back. If all else fails, hardware your playstation to your router directly (which is a good idea anyway).