Electric water heater won't stay on
Bad title. I meant gas water heater.
Sometimes there is hot water and sometimes there is not. No pattern to it.
When we don't have hot water, I will turn the water heater off and back on. It will begin to run, the electric pilot will light, and the flame will light. Sometimes it will stay on and it's fine. Most of the time the flame will just go out anywhere from 2 to 10 seconds after it is lit. I just hit the switch again and it will do the same thing. Sometimes I only have to hit the switch once to have the flame stay on but sometimes it will be up to 4 times before the flame decides to stay on and heat the water.
What would be the problem? The water heater itself is working and heats the water just fine but something is not reading right.
Thanks,