Ammonia & Nitrite problems.
If you have an ammonia or nitrite problem in the tank, reduce the feeding to once every couple of days, and do a 75% water change each day until the levels are back to 0ppm.
Make sure any new water is free of chlorine/ chloramine before it is added to the tank.
Ammonia is produced by anything that rots or breaks down in the water. This can be fish food, fish waste, dead fish, dead plants or even rotting driftwood, although driftwood is normally safe and only rarely causes issues in aquariums. The less rotting material in the tank, and the less food going into the tank, the less ammonia that is produced. Less ammonia means less nitrite and less nitrate in the water.
If you reduce the feeding to once every couple of days, Do Not worry about the fish starving. Unlike mammals and terrestrial animals that use most of the food they eat to keep warm, most fish take their body temperature from the surrounding water. This means any food they eat is used for growing and swimming. Because of this, fish can go for weeks or even months without food and not die from starvation.
Most aquarium fish are over weight and most water quality issues are caused by too much food going into the tank, and not enough water changes being done to compensate for the food. So if there is a water quality issue (caused by ammonia, nitrite or nitrate) reduce the feeding and do big daily water changes.