HARTFORD, Conn. — Soaring numbers of overdose deaths are adding to woes already plaguing medical examiner and coroner offices, resulting in a shortage of places to store bodies and long delays in autopsies and toxicology testing.

The Connecticut medical examiner’s office has considered renting a refrigerated truck to store extra bodies because its storage area has neared capacity at times. In Wisconsin, the Milwaukee County medical examiner’s office sometimes has to put bodies on Army-style cots in its refrigerated storage area because it runs out of gurneys. The Hamilton County coroner’s office in Cincinnati has a 100-day backlog of DNA testing for drug probes, largely because of increased overdose deaths.

Medical examiners and coroners say overdose deaths are adding to a strain on their offices that already includes a surge of urban violence, inadequate facilities, budget problems and the shortage of forensic pathologists qualified to perform autopsies.

“There are many, many parts of the country that have substantial problems,” said Dr. David Fowler, Maryland’s chief medical examiner and president of the National Association of Medical Examiners, referring to medical examiner and coroner offices. “I think the drug overdoses have substantially increased the problems.”

A record 47,055 people died from drug overdoses in the U.S. in 2014, according to the Centers for Disease Control and Prevention. The number was up 7 percent from 2013, spurred by large increases in heroin and opioid painkiller deaths.

There are about 500 forensic pathologists in the country, but at least 1,000 are needed, according to forensic science groups. A major cause of the shortage is that many medical students are opting for higher-paying jobs in regular pathology jobs in hospitals.