If you had increasing scope of accomplishment and preferably at least one title change, you're fine
If you haven't been promoted and your projects aren't getting better, you're still OK at this point but you have two years in which make your next move.
“Six years (72 months) is the point at which it starts to hurt you if you're not getting promoted or better projects
If you keep getting promoted, however, there's no upper limit on how long you can stay at a job.
if you are very good you will get promoted
If you are not promoted you should leave only if you hate your job or a golden opportunity comes,
So if you stay a company for a long time, make sure you accomplish something substantial and then take on demonstrably new challenges
if you are staying in a job you don’t enjoy
If you don't like your job you should leave
If a job isn't right for you, you leave whenever you want. Have full confidence in your decision
If a future employer asks you why you left after two years, two months, or two days, you tell them