Raspberry Pi Powering Off After a Booting and Running Octoprint

So I have installed Octoprint and have had it up and running.
The problem is I have noticed that after about 10 - 15 minutes it seems to crash and the Raspberry Pi goes dead. I only noticed this when accessing it remotely. I was viewing my printer using an attached USB camera and the frame froze, I then noticed that I could no longer SSH into it. When I looked at the Pi the USB WiFi dongle had stopped flashing and it appeared dead. I rebooted it and after about the same time it just died again?

Could this be a power problem? I am using a 2A PSU.

This is a Raspberry Pi B+

Pi B+ or Pi 3B+? Please share the octoprint log.

Happens to me all the time, it drops the wifi but printing continues so the pi itself is ok, it's just the wifi that's down.

I run this every minute https://github.com/wxlcat/NetReconnector in crontab, it resets the wifi adaptor if it detects that the network is down.