I'd guess it needs cleaning. Either the burner "tube" (that passes through the water tank to transfer the flame's heat) or the Burner itself. If it's Atwood, there's a thermal "fuse" that's designed to shut the gas off if it flames back, so you might find it won't light without replacing that.
But... I must ask... How do you USE the water heater? We camp mostly at state parks without sewer hookups, and shower in their bath house. I use it mostly for washing dishes, and it takes only a few minutes, on LP or Electric, to get plenty of hot water. Then I turn it off again. The few times we've been on full hookups, we've used our own hot water and the heater was just fine. Suburban SW6DE, which is six-gallon DSI LP and Electric. If we were on full hookup all the time and wanted long showers, then maybe tankless. For our use, no way. For me the DSI with Electric is top of the line.