Commonly up to six months after an bad infection, flu, major surgery with anesthesia, etc, excessive hair shedding can occur because during illness the hairs did not shed normally. Chronic illnesses such as Diabetes and Lupus may cause long-term hair shedding leading to severe thinning.
There are over three hundred medications that can lead to excessive hair shedding which can happen even up to three months after stopping meds. It is usually temporary, but can be long-term. Common medications include high blood pressure medications, high doses of Vitamin A (Ex. Accutane), birth control pills, anti-depressants and blood thinners (Ex. Coumadin).
Do not stop medication without consulting your doctor!