Dysmenorrhea can be caused by an overproduction of prostaglandins, or it can be caused by endometriosis. The basic causes of dysmenorrhea include excessive secretion of prostaglandins by the endometrium, which is produced by the endometrium during menstruation. When the level of this hormone is too high, it will cause strong contraction of the uterus and vascular spasm, resulting in ischemia and hypoxia inside the uterus, which in turn causes dysmenorrhea. Generally speaking, this kind of patients need to do a good job of psychological counseling, and patients need to maintain good habits such as adequate sleep, appropriate exercise, smoking cessation, etc. When the pain is unbearable, you can choose to take prostaglandin synthetase inhibitors, such as ibuprofen, ketoprofen, meclofenamic acid, diclofenac, etc.. Dysmenorrhea is also seen in patients with endometriosis. If symptoms are not relieved by lifestyle modifications, you should seek medical attention and treatment under the guidance of your doctor.