Closer social relationships in childhood and being raised by a family with higher socioeconomic status was linked to people being more optimistic during midlife and increased chances of living to an older age. Those who were more disadvantaged growing up and experienced psychosocial stressors tended to experience more stressful events during midlife and had an increased risk of early death.