For what length of time can the side effects of antibiotics last?

Dpends on the effect. There are many side effects from different antibiotics from slight rash to diarrhea to serious and life threatening side effects like steven johnson syndrome and others and it may be few days to several weeks after the antibiotics are stopped.