Labor pains after baby??

Tyra

So I’m 17 weeks pp and at a little over a month of delivering my baby one night I had such horrible pains that literally felt like I was in labor all over again, and the pain got so bad it make me puke, then I felt the pain again, puked again, then it was finally over, kept asking different people in my family if they knew anything about it, and finally just tossed it up to the fact that it was just everything returning to normal, plus I’m breastfeeding so maybe my craps are just worse...well 3 months have gone by, and last night I got those same pains. Felt like labor, and then some. Felt like I was dying the pain was so bad...Same thing as first time, puked, little relief, pain all over again, puked 1 more time, then done. After all the pain I felt like I was going to pass out. Has anyone else ever experienced this? The only relation to the 2 nights that I was think of was I had ranch both nights to happened, and it was the end of my period both times. Is it something to do with my period, and me breastfeeding maybe??