How long you can safely stay in ketosis varies depending on your overall health status and medical history. You should always speak with your healthcare provider before making any significant changes to your eating habits or lifestyle, and that goes for starting any eating routine designed to get you into ketosis, too. You should also consult them if you’re considering continuing that routine for an extended period.