Keep them in high humidity and as cool as you can (40's if possible). Also onion type has a huge amount to do with storage time. Sweet onions, Vidalia, Walla Walla, and such) don't last more than a month or two generally. Stonger onions are the ones you want for keepers. Typically yellow onion keep better for me than red's or whites. I can't keep red hardly any length of time, so I just pull them and eat as they grow and not try to save them.

I found and planted some Stuttgarters this year. They are known as a very good storage onion. We'll see how they do.