Used to show that someone is experiencing a lot of emotional stress, like worry or fear. After the scandal, he's been on the rack, scared to face his colleagues.
Pro Tip 2/3
Physical metaphor
The phrase stems from the idea of being stretched painfully on a medieval torture device, the rack. Waiting for the test results felt like being on the rack.
Pro Tip 3/3
Informal Use
It's an informal phrase, more appropriate in casual conversations, not formal situations. She's been on the rack ever since the breakup, dude.