LOS ANGELES — ESPN, the sports network that drives Disney’s profit engine, has hit a soft patch. Subscribers have fallen by about 7.2 million over the last three years, according to Nielsen, and it’s coming off a round of layoffs. As more people cut the cord to watch programming online, its perch on top of the pay TV empire is looking unsteady.

The network’s troubles are a bellwether for one of TV’s biggest challenges: the ever-increasing cost of sports rights and whether consumers want to keep footing the bill.

The conundrum was reflected in Disney’s quarterly earnings Tuesday. Even though “Star Wars: The Force Awakens” helped Disney’s earnings soar 32 percent to a record $2.9 billion, its television profits slumped by 6 percent, in part due to increases in the cost of sports-broadcast rights. It was Disney’s second profit decline in the TV segment in the last four quarters. Shares fell 3 percent to $89.48 in after-hours trading, the lowest level in more than a year.

Major media companies have invested $130 billion in sports rights over the next several years, Morgan Stanley analyst Benjamin Swinburne said in a recent investor presentation. But the cost of those rights is increasing faster than the revenue produced. Leading the pack of big spenders: Disney’s ESPN juggernaut, which accounts for about 29 percent of those long-term contract rights.