A pilot light may not stay lit when the burner is turned on if the pilot is clogged with ash or food particles or if the pilot flame is set too low. The flame on the pilot light can be adjusted by turning screws that are located on the pilot or close to it.
The flame of the pilot light should be set to 1/4 inch, so that when the pilot is lit, the flame is almost entirely blue with just a tinge of orange near the top. Some pilot lights are equipped with a shield that protects the flame. A pilot flame should never come in contact with this shield. Ash from the gas being burned by the pilot light can also accrue around and inside its small vents. This could cause the pilot to frequently go out or not light at all. The depression around the pilot itself can also become clogged with food and ash particles and should be cleaned as well. It is usually best to simply buy a new pilot cap to replace the clogged one, as they are relatively inexpensive. However, the pilot cap can also be cleaned using a toothbrush and compressed air to clear its the tiny vents.