I had a very on-again, off-again experience due to personal circumstances changing several times. Elapsed time from first lesson to checkride was over 5 years so I think I had about 87 hours in my logbook when I finally did it. I'm not sure if there's a hard time limit where you should just give up but if you're flying regularly (i.e. once or twice a week) and you simply stop making progress then I'd think you at least need to step back and see if you can work out why.