1. In a large bowl, mix 1/2 the onions, 1/2 the garlic, and 1/2 the oil. Pour into a shallow, rimmed pan (12 by 15 in. to 15 by 17 in., and 1 to 1 1/2 in. deep). Repeat with remaining onions, garlic, and oil, and pour into another same-size pan.
2. Bake in a 400° oven until onions are limp and well browned, 1 to 1 1/2 hours, switching pan positions and stirring mixture from pan sides into center with a wide spatula every 15 minutes to avoid scorching or burning.