Long period?

I have had my period for 63 days and I am in a lot of pain. The doctor doesn’t know what’s wrong and has just given me pain killers before I got my period I hadn’t had it for 6 months. What do I do