People were left hanging vertically on the tracks of a 72ft (22m) high rollercoaster after it broke down.