Organic matter decaying is your source of nitrates. Poor water quality (such as improper salinity) causes things to die which causes your nutrients to spike which causes things to die, and so on...
Grab some dry rock of your choice, grab some lanthanum, let the dry rock sit in RO for a couple days, dump some lanthanum in. Compare to dumping lanthanum in plain RO.