gas drier not hot enough

Hi;
Drier is not drying cloths in the normal time. . Flame goes on, then goes out after about 15 seconds. A few minutes later flame on and off repeats. Can this be a thermostat problem or a coil problem?
Thanks for your help.