WE just replaced our hot water heater this past October. THe pilot light had been going out for a few months,and we were thinking of replacing it anyway, since it was the original with the house, and the house is 24 yrs old. But DH kept putting it off, and relighting the pilot light.........well, we had the decision made for us after being away for a long weekend the beginning of Oct.
We came home to a flooded laundry, family room, and water spreading up the sheetrock walls. We got a new one right way, but what a mess.......
I would weigh how old it is, against any repairs. You can always have someone come out and look at it and see if it is worth repairing if it is only a few years old. Ours was just way past its life expectancy and finally gave up.