I highly recommend going to see a doctor. How long is kind of hard to answer. Take a few days off, then start of easy. Make sure your saddle hight is not too high or too low. In general check the fit of your bike. If you haven't done so already I recommend getting professional fitting. Did I mention seeing a doctor?