Sometimes solving a problem is like driving a car: you find something in front of you blocking you and you feel stuck.
In moments like these, you can spend a lot of time sitting and waiting, ready to move faster just waiting for the blockage to clear up. But instead, what if you changed lanes on the road? Suddenly that roadblock that was in front of you slowing you down isn't in front of you any more.
When I find myself at a serious road block (like an all-day bug I'm stuck on) I try to force myself to switch tasks, and change the perspective from which I'm trying to solve the problem. Because of this, even if a bug took more than one day to solve it, I'm not sitting there for a whole day feeling like I've made no progress.
Usually though, I'll be doing entirely different - maybe not even working, maybe I'll be in the shower or shopping or walking down the street - but before too long usually the solution to my roadblock comes to me and I'm able to go back and solve it!