Even though it seems that they just pop up out of nowhere, the truth is fruit flies are attracted to fermenting fruits and vegetables and thrive on high-fructose substances. Female fruit flies lay their eggs on the surface of or inside overripe, rotting, or decaying fruit. If you think that’s gross, brace yourself. Each female fruit fly can lay up to 500 eggs at a time. They have a lifespan of only 7 to 10 days. Success in treating Fruit flies is breaking their lifecycle.