How long is too long in a Deficet ?

I always here that it’s if your in a calorie deficit for too long you will slow down your body’s metobilsm , but no one ever says how long is “too long”

I have a goal to lose 30lbs by May-June so for example if I’m eatin 1500cals for 5 months is that too long?