It isn't grounds for automatic refusal, I applied for my study permit extension 14 days before my original permit expired due to personal reasons and I got approved with no issues.
However, it is recommended to apply almost 30 days before your original study permit expires so that in the case your extension gets refused, your original study permit wouldn't have expired and you can have enough time to apply again without having to stop studying and going through the process of restoring your status (honestly this is why I think the 30 day rule is there, I don't think there's any explicit reason available as to why it's there)