Due to my bout of bad health last year, I went with no fapping and no porn for about three months, possibly longer because I was already feeling a drain of energy generally speaking about one month or so before it really started. Though in this case it was more I had no choice, unsurprisingly it's hard to excite yourself when you have a fever and are lying in bed half-dead. Even after that I was no where near my original levels, since I had a surgery drain sticking out of me rather close to my crotch, which is a bit of an inconvenience. After my second, bigger surgery in October, I understood how successful it was and how much of my health I recovered in a short time based on how horny I got while still in the hospital, just a mere couple of days after the surgery. So, lesson here is, illness is a way to forcibly force nofap on yourself.
Voluntarily I have done it for periods of a week or two weeks now and then just for the hell of it. For porn I've probably gone without it for much longer. I think my longest may've been half a year during the end of high schools and beginning of college.