If a gas pilot light on a water heater continues to go out, the thermocouple may be bad. Other common causes of pilot light problems include a dirty pilot assembly and, on propane appliances, an empty tank.
Thermocouples are safety devices that shut off the gas supply to the water heater if they cannot detect heat from a pilot light. If the pilot light is out of adjustment or the thermocouple is faulty, it closes a valve to prevent unburned gas from filling the home.
If the homeowner has not serviced the water heater, carbon builds up around the gas opening for the pilot light. The carbon makes it difficult for the flame to burn. Eventually, it shuts off the gas flow, and the pilot light is no longer hot enough to warm the thermocouple or able to receive enough gas to stay lit.
With natural gas, pipelines provide an uninterrupted flow of gas to the appliance. With liquefied petroleum gas, a truck delivers more fuel to the tank in the yard. If the truck does not make the delivery soon enough, the tank runs out of fuel. While there is sometimes enough fuel in the lines to light the pilot, the pressure is so low that it goes out again quickly.