I also had a couple of bad batches in the recent past. In my case, I traced it back to storing my fermenter bucket and no-chill container partially filled with sanitizer.
I think what was happening was that the sanitizer would lose strength until something nasty could get a toehold. I realized this when I opened my no-chill container, and saw what looked like a cotton ball floating in the sanitizer. Whoops.
Since then, I've switched to stainless for no-chill cooling and glass for fermenting, and the problem resolved itself. I also started paying more attention to the dip tubes on my kegs, and I now store equipment dry and upside-down, instead of full of liquid.