It sounds like the boiler is not able to keep up with the demand being placed on it by the hot water draw off for some reason, assuming you are meaing it goes from hot to cold and remains cold until water turned off, rather than cycling between hot and cold whilst running. If it were the heat...