Making all that whey is complicated.

In retrospect, maybe the protein Pop-Tarts were a bit much. Americans, broadly speaking, are in a state of protein mania. We are eating it at breakfast, lunch, dinner, dessert, and just about anytime in between. We like it in chips, candy, soda, water. We like protein so much, in fact, that we’ve been eating it all up.

Whey-protein prices are surging, and a shortage may be imminent. “Demand is strengthening,” the USDA warned in a recent report, and “inventories remain tight.” Some manufacturers have already sold their supplies for the full year. Since January, wholesale prices for food-grade whey powder have risen by more than 50 percent, to the highest level on record, according to the commodity-pricing experts at DCA Market Intelligence.

Retail prices are going up, too: Six months ago, a two-pound jug of Optimum Nutrition’s “delicious strawberry”–flavored whey protein powder went for about $40 on Amazon; now it’s $54.03. “We’ve absolutely felt it,” Stephen Zieminski, the CEO of the supplement company Naked Nutrition, said of the shortage in an email to me (though he noted that his company had not raised prices). “Demand is up and supply is tighter than it has ever been.”

Historically and currently, much of the protein that has made its way into packaged foods and smoothies and those big tubs of protein powder comes from whey. Raw milk is treated with heat, acid, or enzymes to coagulate it into two distinct substances: curds, which become cheese, and whey, which was, at least until recently, the cheesemaking process’s unlovely by-product.

Almost as long as industrialized agriculture has existed, the problem with whey wasn’t scarcity at all, but the opposite. Farmers did anything they could do to get rid of it as cheaply as possible: fed it to livestock, sprayed it onto fields (“although the smell and salt often proved to be troublesome,” as one food scientist put it), dumped it into rivers and sewers. For much of our nation’s history, any fish unlucky enough to be born in Wisconsin or Vermont had a good chance of being murdered by whey.

Then environmental regulation limited whey dumping, and technological developments made processing whey into powder much easier. Starting in the 1980s, whey was the food industry’s go-to source of supplemental protein: cheap, vegetarian, efficient, and already right there in abundance. Supply and demand were more or less in alignment, for a while.

But then came protein fever. Influencers started bragging about how many grams they got in a day. The government flipped the food pyramid around, placing protein at the top. People from every walk of life latched onto protein as a sort of one-size-fits-all superingredient, supposedly capable of giving anyone the body they want, as long as they eat enough of it (even though the reality is, obviously, more complicated). And food manufacturers responded to this new demand enthusiastically, cramming in America’s new favorite macronutrient wherever they could, usually in the form of whey.

Now the infrastructure can’t keep up. The North American dairy industry has pumped about a decade of investment into whey processing over the past four or five years, the University of Wisconsin at Madison agricultural economist Leonard Polzin told me—but it’s still not enough. “Consumer demand and consumer preferences can change faster than processing capacity can,” he said. “We’re in that lag situation right now.”

Turning fresh, raw cow’s milk into the shelf-stable, scoopable, tasty-enough protein powder people want is a massively complicated process, one that requires space and time and huge, expensive machines. At one point while Polzin and I were talking, I suggested that one of these machines might cost, say, $100,000. Wrong, Polzin told me—try millions. A full processing plant can cost up to $1 billion to build, he said. “Everything is just big numbers.” Even if you had, theoretically, started raising capital for a dairy-processing facility the day the word protein-maxxing first appeared on Reddit—three years ago—it would unlikely be up and running today.

The higher the protein content, the more complex (and expensive) the processing. Whey protein isolate—the proteiniest protein available, the kind that makes it possible to stuff half a chicken breast’s worth of fuel into a candy bar—is the most expensive and, until recently, was a very small part of the market. The dairy industry just isn’t set up for it. “The processor decisions are long-run decisions,” Polzin said. “It’s really hard to make capital investments at the drop of the hat, based on whatever new shiny consumer preference there is out there.”

Polzin grew up on a dairy farm. He remembers the cottage-cheese craze of the past, when a fitness-fixated country set its sights on a different milk-based superfood that was supposed to make you healthier and thinner and more powerful. Trends come and go, was his point. They move quickly. Our appetites change faster than the systems that satisfy them. North America is currently building out about $12 billion of dairy-processing capacity. Projections suggest that the current shortage will be short-lived and that the dairy industry will catch up with demand in the near future. I just wonder what consumers will be demanding then.