Why are your onions dying?

When the onions leaves put their enitre energy into the bulbs that turned into onions, it start dying. Pull your onions out once the leaves die.