The a dults live about 7 to 10 days. The female deposits 100 to 300 eggs in batches of 2 to 30 each in decaying organic matter. The pupal stage lasts about 5 to 6 days. The key to solving a fungus gnat problem is to find and eliminate the source , i.e., find the areas of excess moisture. If the problem is relatively constant regardless of the time of year, then the source is more likely to be indoors or at least associated directly with the structure.
Potted plants are often the culprits.
Check plants to see if the soil is excessively wet. Drain any excess water from the dish below the pot. You can also drench the soil as mentioned previously. Then, increase the interval between regular watering and the problem should abate. Check other areas where leaks may occur as a result of storm damage or poor maintenance, e.g., roofs.