Small Engine Troubleshooting Problems? Ask a Mechanic Now.
In the carburetor is a solenoid. It may be going bad. Listen for the click when you turn on the keyswitch. When it quits on you, turn the switch on and off, listening for the click. No click, no fuel!
It can be overheating and shutting off the fuel. If it is acting up, you can remove it from the carb, and cut the tip off, and re-install as a dummy, for test. It is called anti-backfire solenoid, and is used to keep engine from backfiring when key is turned off.
See picture # ***** .