If for the country you are visiting, refer to their short-stay rules. e.g: you have Schengen visa for 2 years, you are only allowed to stay in the schengen area 90 days every 180 days.
If for Canada, leaving for 4 months as a refugee will rise red flags when you come back, and I would advise...