Male spiders identify themselves by a variety of complex courtship rituals to avoid being eaten by the females. Males of most species survive a few matings, limited mainly by their short life spans. Females weave silk egg-cases, each of which may contain hundreds of eggs. Females of many species care for their young, for example by carrying them around or by sharing food with them. A minority of species are social, building communal webs that may house anywhere from a few to 50,000 individuals. Social behavior ranges from precarious toleration, as in the widow spiders, to co-operative hunting and food-sharing. Although most spiders live for at most two years, tarantulas and other mygalomorph spiders can live up to 25 years in captivity.