The number of container ships waiting to enter the biggest U.S. gateway for trade with Asia reached an all-time high of 65 vessels, carrying potential payloads of cargo boxes that would stretch halfway across the country if lined up end to end.

Outside the neighboring ports of Los Angeles and Long Beach, California, the queue as of late Thursday had lengthened by 10 vessels over the past week and was expected rise even more in coming days, according to officials who monitor marine traffic in San Pedro Bay. The average wait was 8.7 days compared with 6.2 in mid-August, according to L.A. port data. The ship waiting the longest arrived on Aug. 23.

The flotilla, either anchored outside the ports or drifting further offshore until an anchorage spot is available, has a combined capacity to carry nearly 400,000 20-foot equivalent units of containers, according to data from the Marine Exchange of Southern California & Vessel Traffic Service Los Angeles and Long Beach. Both ports have handled a monthly average of about 862,000 inbound containers this year.

According to Hong Kong-based Freightos, an online shipping marketplace, China-to-U.S. transit times for ocean freight reached 71 days door-to-door this month, up from 40 days two years ago.

Bottlenecks are exacerbating capacity constraints in shipping and pushing transpacific freight rates to all-time highs.

Shipping a 40-foot container of goods from Shanghai to Los Angeles cost $12,424 this week, triple the spot price at the start of the year, according to the Drewry World Container Index released Thursday. Freightos, which measures container rates plus premiums and surcharges, shows a 40-foot box soaring past $20,000, compared with less than $4,000 in early 2021. 

The beneficiaries include A.P. Moller-Maersk A/S, the world’s largest container carrier. On Thursday the Danish company raised its full-year profit forecast, signaling that consumer demand in Europe and the U.S. will remain at current levels at least through the rest of the year.