For a self-sustaining base on Mars (or elsewhere)... I've read and been told that growing enough plants to eat would produce too much oxygen, but there are many in-depth designs for self-sustaining outposts, and similar things have been achieved here on Earth with Biosphere 2. So, how does one grow enough food to survive on without generating far too much oxygen?
This question is based on something of a misunderstanding: the study which made excess oxygen a problem was not about a self sustaining mars colony but rather an initial stay relying mainly on stuff brought from Earth. When plants perform photosynthesis they consume CO2 (exhaled by the astronauts and/or from the martian atmosphere) and release O2, which would build up inside the habitat until reaching dangerous levels.
The problem wasn't too much oxygen per-se, but rather that nitrogen would be vented at the same time as the excess oxygen - resulting in the very limited nitrogen reserves running out - since nitrogen is only a small fraction of the Martian atmosphere it is difficult to build up large reserves of it without heavy machinery, and in the study the proposed base could neither prevent nor accommodate the nitrogen losses due to venting excess oxygen.
A well-designed long term colony would either have a way to isolate and eliminate just oxygen, or alternatively have a plentiful source of nitrogen. Either way internal atmospheric pressure and N2/O2 balance could be maintained safely.