From the rise in fentanyl overdoses to preventing the next Orlando massacre, more than 3,100 county sheriffs and their staff members from across the country gathered in Minneapolis this week to learn from one another’s successes and failures.

But key among issues at this year’s convention of the National Sheriffs’ Association is an ongoing crisis: the safe and humane treatment of mentally ill inmates.

“Chillingly, jail cells have become America’s new asylums,” said St. Charles Parish (La.) Sheriff Greg Champagne, who serves as president of the Sheriffs’ Association. “It is a revolving door of neglect, incarceration and further societal sidelining.”

Many mentally ill inmates are called “frequent fliers,” because they repeatedly get arrested so they receive medication, treatment and safe housing in jail that is difficult to find in the community, he said.

At the Hennepin County jail in Minneapolis, about one-third of the 40,000 people who are booked each year are battling some level of mental illness, said Sheriff Rich Stanek. His office led a tour of the jail, highlighting how deputies and medical staff members take care of mentally ill inmates — and how Hennepin County has become a model in how to do more than simply warehouse them. A registered nurse evaluates people at the start of the booking process and someone with a mental health issue is grouped with similar inmates to receive special programming. The county hopes to start a video visitation system that would allow relatives to talk to someone at a place other than jail.

On Tuesday, 758 people were in the jail.

The convention has seminars and training in subjects on everything from cigarette smuggling to law enforcement use of drones.

And in light of the massacre that left 49 people dead at an Orlando nightclub earlier this month, FBI Director James Comey rearranged his schedule in order to address the convention.

The issue of opioid abuse was a particularly hot topic this year, said the association’s executive director, Jonathan Thompson. He advocated for the widespread use by sheriffs’ departments of Narcan, a nasal spray that can be quickly administered to somebody having an opioid overdose.

Dane County (Wis.) Sheriff Dave Mahoney discussed his office’s tool to help opioid addicts kick the habit once they leave jail. They are offered a dosage of Vivitrol, which blocks the effects of opioid medication. One shot lasts for 30 days.

Besides seminars and training, the convention offers a technology and equipment exhibition.