Which created the most trouble for China, internal problems or external problems? Why?

Which created the most trouble for China, internal problems or external problems? Why?