Thermocouple problems
A thermocouple produces a small electrical signal when the pilot flame heats it. If that signal is too weak, the safety valve may not stay open.
Poor flame contact, a dirty pilot or loose connections can cause the same symptom, so replacing the thermocouple without checking those may not fix it.



