Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Something I found suggested on the Apple forums was to make sure the machine hosting your library and the ATVs are all on the same sort of connection - i.e. all wireless or all wired.

my setup is all wireless to the airport extreme.. still have the problem. I told the iMac not to sleep and it *may have helped*, but not fixed it. All you people make sure you log the problem with Apple so maybe they could carve out a few hours to find the bug. Maybe when the iPhone 5 is out they can spare an engineer.
 
That happened to me all the time but I changed my router and upgraded to ios 5 beta for atv2 and my problems are now gone, I don't know which one solved my issues, though.

Edit: I'm also using iTunes 10.5 beta too
 
solution for apple tv losing connection

try this guys as have had a similar issue in that apple tv lost my connection to the shared library on a PC after about 10 minutes. apple tv had latest firmware on it.

to test this to start with go to control panel and turn of your firewall. test that you can maintain connection.

Apple TV uses bonjour application to connect to the shared itunes library and the firewall is blocking the ports it needs. It communicats back approx every 10 minutes from appletv to itunes via a responder application

so to resolve create a new in bound rule and select the bonjour mdnsresponder application (c:\program files\bonjour) enable for both public and private network for all ports. restart the firewall service for public and private networks and away you go.

hope this fixes your issue certainly fixed it for me so no longer a frustrated user
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.