It is prohibited to recite a davar shebikedushah in a place where waist from the human body, urine, smelly garbage or any other object with a rotting odor is present. The Rabannan added to this prohibition a place where a foul odor is present, even when the tangible source is not present. However, one is permitted to have thoughts of Torah, silently read, or listen silently to words of Torah being spoken a distance away.
One must distance themselves four amos (aprox. 6 and a quarter feet) from where the odor is no longer evident in order to be able to once again recite a davar shebikedushah.