I think any specific amount of time or number of attempts depends entirely on the situation. For me, it falls more along the lines of 'if it's disrupting other skaters' practice, then it's a problem'. So, if you're in the same spot for a long time and not moving for other skaters, that's not cool. The longer you're in the same spot, the more you need to yield.
Or, if it becomes clear that another skater wants to use that spot, and you've been there for more than a handful of attempts and you are not in lesson (there are ice hog coaches, but that's a different situation...) then you need to move on. This is particularly true of working on things in popular spots such as on the hockey circles or exercises/drills that follow a line. Whether there are 2 or 20 skaters on the ice, or one is a beginner and another is landing triples, everyone paid for use of the entire surface.
On the other hand, if no one is bothered, then camp all you want - just be aware of what's going on around you. But I do think you'll get more out of your session if you're working all over the ice surface. It keeps you moving and keeps you thinking.