The length of this time depended on many factors but from the ones you've listed here, avaliable food amount was surely the most important one. When there wasn't any food left in a certain environment, this meant that there was no reason for a nomadic hunter-gatherer people to stay in that place anymore.