Mag springs fail from: 1) Long-term, repeated cycling (fatigue), 2) Corrosion and/or physical wear caused by repeated cycling, and/or 3) Because the spring was poorly made in the first place (metal/heat treatment).
As a precaution against corrosion, most mag springs should have a thin film of oil put on them. In extremely dry and dusty climates, skip the film of oil.
Magazines on rifles such as the AR, whose mags tend to become dirty, should be periodically cleaned. Mini mags can go much longer between cleanings.
A well-made mag spring can last for decades even if fully compressed.
Feed lips are another story, as their longevity is dependent on the material out of which they are made. IMHO (and not wanting to start an argument), one of the functions of the "dust cover" sold with P-Mags is to prevent the plastic feed lips from gradually deforming when the mag is stored fully loaded, although Magpul disagrees (kinda). With plastic mags, extreme heat can hasten such feed lip deformation. There are some plastic mags which include metal reinforcements for the feed lips. This is NOT a slam on Gen M3 P-mags, which are excellent mags overall.