NXT shuts down in 5 minutes
I did not have that problem but I checked that error from programmer's perspective. The source seems to originate here athough it can be also found mirrored on GitHub where the complete package can be downloaded. After short analysis of few files it looks that the message you quoted is sent on re-initialized link (connection). The link is reinitialized automatically if its state is either uninitialized or failed.

If you can observe exactly the same time till each failure, then it looks this can be rather software issue than a hardware one. It can be still related to what you wrote in the question (one end of the link shut down after 5 minutes) or it can be related to some other software-based conditions. Try with trivial scenarios first. Also ensure that the firmware of all involved devices is up-to-date.