I'd check with all your vendors & see when they need final count. Ours was 40 days out, our transportation needed a final count 30 days out. The rest don't need final count until 14 days out. I left myself 10 days to contact guests who didn't RSVP.
You’ll need to have your rsvp deadline 45 days from the wedding date itself. The reason being most venues, vendors etc need all final balances paid in full 30-days from wedding date. that gives you about two weeks to bug those who have not rsvp’ed. and then give your final numbers/any changes etc to the venue and vendors.
Our wedding is October 13th, and I made our deadline September 15th. Our caterer needed final number by September 24th or 25th so I wanted a few days to contact anyone that didn't RSVP although a good amount already have.
I set ours as August 31st for a September 28th wedding which is 4 weeks ahead. This way I had time to follow up with those who don't RSVP by the set date before the 2 week deadline is due to vendors with final numbers.
Most are about a month before. However, go over your contracts and see when your vendors need a final headcount, and then make your RSVP deadline one to two weeks before that so you have time to reach out to stragglers.