Fasting in Buddhism

In Buddhism, there are a variety of attitudes towards different forms of fasting (Skt. upavāsa or anaśana). The Buddha is known to have practiced extreme forms of fasting which led to his emaciation and to have famously abandoned it before his great awakening. Nevertheless, different forms of fasting are practiced in various Buddhist traditions.
Traditionally, Buddhist monastics follow the prātimokṣa rules outlined in the various Vinayas (texts outlining the monastic discipline) all which specify that one must not eat after the noon meal. Instead, Buddhist texts mention that this is a period which should be used for meditation or sutta chanting. Breaking this rule is considered a pācittika offense which needs to be confessed. This is not considered a kind of fasting, but a simple and moderate way of eating which is said to aid one's meditation and health. Devout lay Buddhists will also follow this rule as one of the Eight precepts during important days of religious observance (uposatha).
The Buddha's Middle Path refers to avoiding extremes of indulgence on the one hand and self-mortification on the other. According to the early Buddhist texts, prior to attaining Nibbana, Gautama Buddha practiced a regime of strict austerity and fasting which was common among the sramana religions of the day (limited to just a few drops of bean soup a day). These austerities with five other ascetics did not lead to spiritual progress but did cause him to become so emaciated that he could barely stand. It was only after he gave up the practice of harsh asceticism, including extreme fasting, and instead focused on the practice of meditation and jhana, that he attained awakening.
Because of this experience, the Buddha criticized the fasting practiced by Indian ascetics of his day, such as that practiced by Jains, who believed that fasting burned off bad karma. According to Bhikkhu Analayo:
Instead, the Buddha focused on practicing mindfulness while eating, a practice he recommended to both monastics and laypersons. According to Analayo, this practice connects the second and third satipatthanas (foundations of mindfulness), that of mindfulness of hedonic tones (vedana) and mindfulness of the mind (citta) respectively. This allows one to understand how sensual craving arises out of worldly pleasant feelings, and gain insight into the very nature of sensuality (and thus lead to its cessation).
The Buddha held that practicing mindfulness of eating/food could lead to weight loss and better health. In the sutras he states "when a person is mindful and thus knows moderation in eating, his ailments diminish, he ages gently and he protects his life" (S.I,81-2).
However, the Buddha did end up recommending that monastics not eat anything after noon. This practice could be considered a kind of intermittent fasting, which restricts eating to a specific time period. The Buddha recommended this kind of fasting after noon for health reasons, stating "I do not eat in the evening and thus am free from illness and affliction and enjoy health, strength and ease" (M.I,473).
According to J.E.E. Pettit, early Buddhists also considered abstaining from meat (i.e. vegetarianism) to be a meritorious form of fasting. However, they were not full time vegetarians, generally eating whatever was offered by the laity.
In Theravada Buddhist monasticism, there are various optional ascetic practices named dhutaṅga (literally "means of shaking off" or "shaking up", as in to "invigorate") which are popular with Thai forest monks, several of them have to do with food. One practice is called "one-sessioner's practice" (ekāsanikanga) which refers to eating only one meal a day.
Another practice consists of only eating food collected on one's bowl during the daily alms round (piṇḍapāta) during which monks go begging for food. If one happens to receive just a little food or not to receive any at all on one particular day, one would have to fast.
Dhutaṅgas are seen as means to deepen one's spiritual practice, and to develop detachment from material things, including the body.
Indian mahayana Buddhists practiced the abstention of food after noon as other Indian Buddhists did. They also sometimes had their own unique fasting practices. One of the most popular of these was a one day fast associated with the cult of Amoghapāśa and the Amoghapāśahṛdayadhāraṇi (i.e. Amoghapāśanāmahṛdaya Mahāyāna Sūtra).
Fasting is also an important part of medicinal cures in Indian Buddhism, which were a key part of Buddhist monastic practice (as bad health was understood as being a detriment to one's spiritual practice). Yijing's Record of the Inner Law Sent Home from the Southern Seas is an extensive record of the life in Buddhist monasteries which discusses medical topics. According to this text, regarding the various medical sciences "abstention from food is of utmost importance." According to Yijing, these medical fasts were done for up to seven days in central Indian monasteries (but in other regions, two or three days were the upper limit). However, he also mentions one person who underwent a 30 day fast and recovered afterwards and so he states that the number of days depends on various circumstances and is not fixed.
In East Asian Mahayana Buddhism, there are different fasting (Chinese: zhai) practices. The most common form refers to a strict form of vegetarianism. A common part of East Asian Buddhist vegetarianism is also avoiding the five pungent foods.
One of the most important forms of fasting historically was the Chinese Buddhist practice termed zhaijie or baguan zhai (eight-fold fast), which became an important practice for serious lay Buddhists during the Han dynasty. During a baguan zhai one was expected to avoid all meat (and fish) and take the eight precepts (this includes not eating after noon). The duration of the fast varied; common forms were a six-day fast (liuzhai) and a three-day fast (sanzhai). Another form was a long fast (changzhai) which is observed continuously, "in the first half of the first, fifth, and ninth month".
These practices were popular among many Chinese lay Buddhists, including high ranking literati and officials who would gather together to observe fasts. The popularity of the practice may have to do with some Chinese emperors, such as Emperor Ming (465-472) of the Liu Song dynasty, who was a vegetarian and a practitioner of fasting. The eight-fold fast was often practiced during certain Buddhist holidays, such as during Vesak.
In the Japanese Buddhist sects of Tendai and Shingon, the practice of total fasting (danjiki) for a length of time (such as a week) is included in the qualifications of becoming an ajari (acarya, a master teacher). The Tendai school's grueling practice of kaihōgyō ends with nine-day period of fasting, which is a total abstention from food and drink. This practice (along with other ascetic practices like bathing in freezing water - suigyo) is considered to be highly effective at producing ascetic spiritual power as well as having cleansing properties and producing mental clarity.
Fasting is also practiced in Korean Seon Buddhism, as a supplement to meditation and as part of a training called geumchok.
The East Asian Buddhist practice of self-mummification (sokushim-butsu) also includes intense fasting (until death).
The Vajrayana practice of nyungne is based on the outer tantra practice of Chenrezig and traced back to an Afghan Buddhist nun named Gelongma Palmo. It is said that Chenrezig appeared to an Indian nun who had contracted leprosy and was on the verge of death. Chenrezig taught her the method of nyungne in which one keeps the eight precepts on the first day (as well as eating only vegetarian food), then refrains from both food and water on the second.