Melon flies are most often found on low, leafy, succulent vegetation near cultivated areas. In hot weather they rest on the undersides of leaves and in shady areas. They are strong fliers and usually fly in the mornings and afternoons. They feed on the juices of decaying fruit, nectar, bird feces, and plant sap.
Development period from egg to adult ranges from 12 to 28 days. The female may lay as many as 1,000 eggs. Eggs are generally laid in young fruit, but are also laid in the succulent stems of host plants. The eggs are deposited in cavities created by the female using its sharp ovipositor. Pupation usually occurs in the soil. There may be as many as 8 to 10 generations a year.