Check the switching for HW demand, Not sure what yours is, Do a search for manual if you do not have one. If the switch if faulty, it could switch off and on. It will be linked to the 3 way valve usually, but some use a flow sensor in a unit on the pipe, One I know of used a flow sensor in a pipe fitting, it used a reed switch, very unreliable.
SD, July 2012