Mosquito Dunks for the fungus gnats. Foe spidermites a safe and effective treatment is 70% Isopropyl Alcohol, dilutes 2:1 with water. Spray the whole plant, top to bottom. Repeat daily for three days. then twice a week for a month. That should eradicate them. spray your tent with it also. No insect is likely to develop resistance, the alcohol dehydrates them. I've been testing this for a while now and there is even no damage to flowering plants or trichromes, the solution is too weak to affect them.
No matter what treatment you do use, it takes months to get rid of those little terrorists....... if ever!