Do you have a gen with a code visible? My advice is #1. Check the low pressure switch. Could be either loose wires or bad switch. #2, wires to relay, loose or corroded. #3, plugs ok? #4, next would be fuel check. Is fuel psi good? If no guage, Easy check is push in Schrader valve (gen off, hard spray?) Fuel pump and filter good? With gen starting but stopping you may have fuel "heating" issue. The cooler may have a bad "internal" pump or the cooler itself it may be partially clogged. Flush with barnacle buster. If damage is beyond flush, replacement is only option. Not repairable. Cost $700. If you have to change cooler, do primary fuel pump and filter at same time. Good luck, been there, done all that.