How long is to long?

Hi y’all! Lately my boyfriend and I have been in a weird funk. He’s just not interested in sex at all no matter what I do. It’s been two months and I’ve tried everything from trying to surprise him and be sexy to straight up just asking him but I always get turned down, So I sent this message last week (now that I re read it , it sounds kinda needy 🤦🏻‍♀️) but we ended up not doing anything at all. But anyways how long have you and your SO gone without having sex?

I’ve asked him why he’s not interested anymore and he said he’s just not in the mood and there’s no other reason.