Aquaponics - Nitrogen fixation

I recently had a spike in nitrites that killed two fish. Actually it killed one fish. I killed and ate the other. But they both died as a result of their being too much ammonia and or nitrite in the system.

I put it down to some mistake I must have made with feeding, but it occurs to me that it might be about my peas and beans.

Nitrogen fixing legumes take nitrogen out of the atmosphere, and stick it into the soil. Most plants take nitrogen out of the soil.

I lifted one of my bean plants that's already got beans growing on it to have a loot at the roots, and remembered that in a dirt garden, you rotate crops from season to season, and plant things like beans in a bed before you plant things like tomatoes.

Tomatoes like a lot of nitrogen, and beans put the stuff in the ground. Or at least I think that's what I remember.

But this lead me to wonder if it might be my beans putting too much nutrient into my grow bed that had caused my fish to die.

I'm still at the wondering stage, so don't take this as science or anything, but according to Wikipedia's article on Nitrogen Fixation, the nitrogen goes in as ammonia.

Bad beans.

I also seem to remember that the nitrogen forms on the roots as nodules, in the form of match head sized lumpy things. But I see nothing like that on my roots.

And...

I cant remember if the nitrogen only goes into the soil once the plants die.

But...

I did have a bok choy plant and a bean plant go all rotten on me, so there could well be a connection.