Nearly all the major refineries along the Gulf of Mexico were shut down before or during Hurricane Rita , cutting total U.S. oil production by nearly 30 percent .