I'm an undergrad with weekly problem sets due. Often if I begin the problem set early and think about it a bit each day, I can solve all of the problems. But other times it will quickly become apparent that one or two problems are going to be sticking points for me and that getting unstuck will be nontrivial.
Ultimately there are failsafes available for these situations: I can ask a friend, go to a tutoring session, go to office hours, or peruse the web for hints. But I much prefer getting the problem on my own, which means I sometimes spend a great deal of time on a single problem for which the payoff (in terms of increased conceptual understanding) is small.
In my own life, when I decide to stop working on the problem will depend on a variety of factors: how stressed I am, whether I feel like I still have ideas, how soon the problem set is due, etc. As it is, I just make a subjective judgment about the relative value of proceeding and then decide to quit or continue. But I was wondering if anyone had any more well-defined heuristics they used to decide when to ask for help.
Note that I'm referring to difficulties with particular problems, not difficulties with underlying concepts, which I would ordinarily try to resolve as quickly as possible (rather than working on them over a period of days). This seems reasonable to me because understanding the theorem statements or techniques used is so fundamental to mastering the material, whereas a difficult homework problem isn't as crucial to one's understanding.