During the test of a certain type of aircraft,the main landing gear upper lock experienced a spring breakage,which prevents the upper lock from locking properly.After replacing the spring with the same specification,the spring still broke multiple times subsequently.A strength and fatigue analysis is then carried out to solve this problem,and the results show that the spring used was close to the material stress limit and unable to meet the fatigue strength requirements.Optimization and improvement measures are then proposed based on the failure analysis results,and the improved spring was verified through experiments and can meet the requirements for use.