The NYT has a terrifying story on spiders and sexual cannibalism.
The females may gobble up the male before, during or after mating, so males have evolved various ways to cheat death. In some species, they wait until the female is busy eating and rush in to copulate while her attention is elsewhere. In other species, they even bring an edible gift to distract their intended.
Male nursery web spiders have evolved a different kind of defense. They tie up the female before copulation, immobilizing her legs by wrapping them in strong spider silk so they can copulate and escape with their lives before the female gets free.