You didn't mention what type of genset or what year so little tough to diagnose, but it should throw a code when it shuts down. Depending where you were travelling it could have shut down from overheating. When it got above 90 degrees in stop and go traffic ours would overheat and shut down. You pick up a lot of heat from the pavement, as well as under the rig.
But as other said, fuel could be an issue, clogged fuel filter, etc.
But if you model throws a code you can easily look up the codes in manual or on line.