How long after a miscarrige will I get an infection?

Should not. Infections can certainly occur after miscarriages, but they are not particular common. If you were going to become infected it would be within a few days unless you had not completely lost all the products of conception from your uterus. If you have a persistent problem see your ob/gyn.