It happens when pain exceeds the resources for coping with pain.