generators, I've found, can be a little finicky ... ours can run for months and months, off and on as needed, with no issues, and yet the other day, it shut down on it's own.
It supposedly gave me a code that alludes to the engine over revving, or something. After letting it sit for an hour, it ran thereafter with no issues, for over 5 straight hours!
A day later, in the hot afternoon, while running for the air conditioners, it shut down again. This time the code alluded to an 'high fluids temp'. I checked the oil, and the coolant, and both were fine. After sitting for a few minutes, I cranked it and it ran for several more hours with no issues.
go figure. who knows.