I had this same problem and of course, it would manifest itself on cold mornings when I needed a shower...
Anyway, it was the little nut that secures the thermocouple to the control valve. All it needed was to be wiggled around some and cinched down a little tighter. That was about 4 years ago and it's been fine ever since.