When must we continue in petitioning and when must we let the matter go?
The Holy Spirit is able to lead. It is not possible to daily ask the Lord for something unless there is supernatural enablement. The request can be made for a while or it can be made here and there over time. If it is not propelled by the Lord, it will become like a rosary and loose personal inclusion.
There are also times of desperate need when one is compelled to go to the only One who is able. Often the Holy Spirit will usher in the assurance that He has heard and answered and it is a matter of waiting.
There is no formula. We are to follow Him and there is no other design.
Until this life is over, may we learn to pray in the Spirit.