NEW YORK (CNNMoney) -- While gas prices soar to record levels, many U.S. refineries that make and sell gasoline are going broke.
Nearly 50% of the refining capacity on the East Coast has either shut down or may shut down within the next few months.
If gas shortages develop due to the closed refineries, East Coast drivers could face higher prices than they otherwise would later this year.
Sunoco (SUN, Fortune 500), which closed its Philadelphia-area Marcus Hook refinery in December and is trying to sell another facility nearby, said its refining businesses has been losing $1 million dollars a day for three years running.
Last fall, ConocoPhillips (COP, Fortune 500) closed its Trainer refinery, also in the Philadelphia area.
If all three refineries were closed, that would leave just six operating refineries in the Northeast.
The refineries are losing money because they are old and cannot process the cheaper, heavier types of oil that are increasingly in supply from Canada's oil sands, Saudi Arabia, Venezuela and elsewhere.
The Sunoco refineries can process only the types of "light, sweet" crude imported from West Africa or the North Sea. The lightness refers to the oil's density, the sweetness to its sulfur content.
Light, sweet oil is the easiest to turn into gasoline -- but also costs about $20 more per barrel.
Refineries that have been upgraded and expanded along the U.S. Gulf Coast are capable of turning the heavier, cheaper oil into gasoline.
East Coast gasoline shortages are a real possibility -- but not because there isn't enough gasoline in the United States. The real problem lies in transporting that gasoline to the Northeast.
Analysts worry there won't be enough barge, tanker or pipeline capacity to bring the gasoline to market.
"There are going to be logistical problems getting product into New York," said Ben Brockwell, an analyst at the Oil Price Information Service. "The people I talk to are expecting shortages from August through the rest of the year."
The supply shortages would occur at gasoline terminals, often identified by those giant, white, round tanks seen near ports and refineries.
And that could drive up gas prices, though the impact should be temporary -- eventually, refiners in the Gulf Coast, Europe or Newfoundland would seek to take advantage of the higher prices by shipping gas to needed areas.
The worst of the supply crunch would come after the peak summer driving season when prices won't likely be as high as they are now.
The U.S. Energy Information Administration has been monitoring the situation. While it isn't quite as alarmed as Brockwell, it does see possible trouble.
"The potential loss of the Sunoco Philadelphia refinery presents a complex supply challenge," the agency said in a recent report.