If your furnace keeps shutting itself off, it could be a problem with one of the electrical connections, preventing the furnace from finishing a full heating cycle. It could also be a safety component turning the furnace off before the internal chamber overheats. These safety measures are designed to respond to specific situations and may indicate they themselves are malfunctioning if everything else is working fine.