Could be your thermocouple. The spark should light the pilot and the pilot lights the main burner but if the thermocouple doesn't pick up the heat from the pilot the igniter will keep trying to light it until it times out and shuts off to prevent gas buildup.
Answers & Comments
Could be your thermocouple. The spark should light the pilot and the pilot lights the main burner but if the thermocouple doesn't pick up the heat from the pilot the igniter will keep trying to light it until it times out and shuts off to prevent gas buildup.