He keeps going flaccid..

So I was having sex with my boyfriend of 4 years and everything was going great. Then all of a sudden he went flaccid? It was so weird so I got him hard again and after about 5 minutes again he went flaccid again and he couldn't finish!! 
This is the first time it's happened in 4 years! Anyone have any idea why?