You should apply as soon as you receive your letter of acceptance from the educational institution. The time needed to process an application to study in Canada may vary at different visa offices.
The time needed can vary depending on a number of factors, including which visa office you apply.
You will need a medical examination if:
you will be in Canada for longer than six months, and you come from a designated country/territory for which Canada requires a visa.
In order to return to Canada, you must be in possession of a valid passport or travel document. You also need to hold a valid study permit if you are returning to study in Canada.
CIC recommends that you apply to extend your study permit at least three months before expiry. Applying for your study permit online typically results in faster processing times.