If you are having a problem with a Windows 7 computer, acting as a file server, constantly losing connection (after some idle time), Then try this fix:

I found a simple solution after a bit of research.
After checking the Event Viewer System log, I found the following error:
Source: srv
Event ID: 2017
Level: Error
The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations.

Apparently you need to tell Windows that you want to use the machine as a file server and that it should allocate resources accordingly.

Set the following registry key to '1′:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache
And set the following registry key to '3′:
HKLM\SYSTEM\CurrentControlSet\Services\ LanmanServer\Parameters\Size
After making these changes and restarting, I haven't seen this issue arise again. Fixed!