Hot Water Heater Keeps turning off

I have a Hot Water Heater about 50-55 gals. thats giving me trouble. Everymorning for the past 3days I noticed no hotwater. I go down into my basement to check on the H.W. Heater and noticed a (Red) light flashing on the control box. I reset the heater by fliping the switch on the the control box. This normally does the trick but now the light comes on more frequently. Can anyone tell me what could be causing the promblem? Do I need the get another H.W. Heater? My unit is only 5 years old.

Get out your manual and find out what code is flashing. That would tell us what might be the issue. With a control panel like that, it sounds like you have either a tankless, or a power vent. There are different issues with each of these.

perhaps you could give us your make and model, and also post a picture of the installation.

I'm posted a diagram of my Hot Water Heater. I can't remember the make and model but I can give you that later today. This is however a power vented unit. I did check my manual for any diagnotic codes for the flashing red light but there were none. The manual simply stated to check the electical wiring and components to make sure they are working properly. I'm always having to turn the unit off and on to get it started. After reseting the switch I did watch the unit go through a heating cycle and noticed the burner was flaming in and out until it finally shut off. That's when the red light started flashing again. Do you think this is something simple that can be fixed or do i need to buy a new heater? This unit is only 5yrs old. I did the proper mantainence by cleaning any dust or dibre from around the burner but this still did not fix the problem.