The rollout switch itself may be working correctly, but sometimes faulty wires connected to the switch to the rest of the burner may be responsible. A failing wire may be effecting the signals that the switch sends. The control panel could have malfunctioning wiring itself, causing it to unexpectedly shut down even when nothing is wrong. You can check wire resistance with an ohmmeter to narrow down the problem, or call in a professional to narrow down the problem for you.
The flame rollout switch may not be the only limit switch that your boiler uses to maintain safety. If the temperature limit switches on your boiler tank are registering too much steam buildup or escalating temperatures in other parts of the boiler, they could be shutting down your system, too. This could be caused by a problem with combustion and settings, or it might be related to a faulty switch elsewhere on your boiler.
Your steam boiler needs air to burn its fuel. Without air, the system eventually fails because the burner flame becomes to weak to properly produce steam. Soot and heavy exhaust can also become a problem. If your unit is shutting off unexpectedly, check your flame to ensure it is strong and examine your supply line for air flow to see if it has become clogged, closed or needs a new filter.
Gas and oil require valves to enter your boiler properly. If these valves become stuck or clogged, the fuel will not be able to make it through and your burner may not be able to burn properly, leading to a shutdown. The burner itself may become clogged over time and frequent use. Oil filters can become filled with debris, ignitors can be jostled out of position and gas lines can develop connection problems. Too much fuel may be causing your rollout switch to activate, while too little fuel may cause your burner to shut down anyway.