It could be caused by your computer going into standby or hibernation mode. You could experiment a little to find out. Go to your Control Panel > Performance and Maintenance > Power Options, and try setting them to never and see if it helps. To narrow it down just do one at a time.
Sample image:
Power Option Properties