Many customers have avoided the chain since then, and in July, McDonald’s Japan, which is half-owned by the American parent company, suspended its profit forecast for the year.

Customers reacted more sanguinely to the fry shortage. Although McDonald’s is selling only the smallest size, it is not limiting the number that a customer can order — apparently counting on Japanese self-restraint to prevent cheating.

One fry lover posted on Twitter a calculation of the number of small-fry orders needed to equal a large: 2.3, by the poster’s measurement. Another responded: “Once you buy two smalls, it’s already more expensive than a large!”

The fry shortage stems from a long-running labor dispute at 29 seaports in the United States, where 20,000 longshoreman have been without a contract since July.

Operators of the ports, which are all on the West Coast and handle about half of the United States’s foreign trade, have accused dockworkers of deliberately slowing shipments, though unions say the ports were strained by a lack of capacity to begin with.

The dispute has been blamed for disrupting exports to Asia of other goods as well, like Christmas trees grown in the Pacific Northwest. But McDonald’s appears to have been especially hard hit.

The sheer size of its Japanese operations is one probable reason, as is the fact that the chain maintains a policy of using only potatoes grown and processed in the United States, meaning it cannot simply switch to a supplier in another country.