I generally have some kind of time limit. Not necessarily a hard and fast limit, but just a "I feel frustrated" limit. So I'll keep failing and plugging away until I really feel like I'm getting nowhere anymore.
A good example of this is my recent transition to Mercurial - I came across this site which I took the time to read, then I spent the next couple days exploring all the ins and outs, reading documentation and playing with it. Eventually I felt like I understood it, and haven't looked back. But even though Mercurial's pretty easy to use, it still took a little bit of time to understand, and I just kept pushing on since I hadn't reached that threshold.
By my metric, the fact that you're asking this question probably implies you're past that "I feel frustrated" point, and it might be good to drop it, and maybe come back to it another day.