Ideally, <1x. I originally wanted to buy in cash. DW convinced me to take on a mortgage. We bought at ~3x but knew our income would soon rise, so it was really more like ~2x. Income kept rising, and paid it off in a few years. Last year, our income was greater than our house, and that's where I'd be most comfortable if we were doing it again. However, I'd be willing to go up to 2x in general; you can pay off a 2x house in a few years if you're frugal and lucky (no unexpected expenses, accidents, unemployment, etc). I'd stay away from anything higher than that; I just remember how we never struggled to pay the mortgage, ever, at that ratio. It was just a question of how much additional money we'd put into retirement accounts.
Oh, and if I couldn't find something within 2x, I'd rent and save...or move.