This happened to me with a Garmin 800 but it was my fault. At a coffee stop I pressed stop and forgot to start it again once I started riding. It shut off after a few minutes.
edit: Also, check garmin support forums as others have had this issue (search for 'shuts off'): https://forums.garmin.com/...lay.php?219-Edge-500
edit: Also, check garmin support forums as others have had this issue (search for 'shuts off'): https://forums.garmin.com/...lay.php?219-Edge-500