Compression spring bucking refers to when the spring deforms in a nonaxial direction, as shown here,
Buckling is a very dangerous condition as the spring can no longer provide the intended force. Once buckling starts, the offaxis deformation typically continues rapidly until the spring fails. As a result, it is important to design compression springs such that their likeliness to buckle is minimized. Buckling of compression springs is similar to buckling for vertical structural columns. When the free height of the spring (L_{free}) is more than 4~5 times the nominal coil diameter D, the spring can buckle under a sufficiently heavy load. The maximum allowable spring deflection D_{max} that avoids buckling depends on the free length, the coil diameter, and the spring ends (pivot ball, ground & squared, etc.). 
One quick method for checking for buckling is to compute the deflection to free height ratio (D/L_{free}) and use the following chart to check if the ratio exceeds the maximum allowable value:
