Fertilizers can last forever. Matter is not actually used up.
As long as we have enough energy, we can make fertilizers. Of course, petrochemicals are a nice raw material, but not necessary.
And we are not running out of energy, anytime soon. (Though we may run out of oil.)