There was a former banker (as in retired - and not really part of the lunacy that went on in more recent years) on the radio the other day. He said you should never exceed 15 times x annual (realistic) rent achievable for a property - and in some specific locations/scenarios, 10 times x annual rent would be more realistic.
Other than that - it's a question of affordability - based on stress testing with higher interest rates (as historically, current rates are considered low) - based on is it 3 or 4x income???, your evaluation of security of your employment, etc.
(these are bits n pieces I have accumulated from far smarter bods here on aam - so I'm sure some of them will give you a more credible and comprehensive response ;-) )