Boston is the second most rat-infested city in America behind Philadelphia, according to federal census data.

And that's unlikely to change anytime soon.

Rats need three things to survive — water, food and shelter. Boston, built on a landfill, has plenty of all three.

“They’re definitely a health hazard,” said Buddy Christopher, commissioner of Boston’s Inspectional Services Department. “Their environment that they live in is filthy. And they’ll transport that everywhere.”

In the early hours of the morning, city inspectors stalk back alleys and trash bins in an effort to neutralize the growing rat population. Following trails of rat droppings, the inspectors set traps and plunge bricks of poison into the sewers to kill as many rodents as possible.

“It’s just out of control," city inspector Chris McNally said. "People have a right to live without dealing with this kind of stuff."

Rat complaints were up nearly 50 percent last year. There were about 3,100 complaints in 2016, up from 2,100 in 2015. According to the city's data, no neighborhood has been left unscathed.

The hardest hit area is Dorchester — the city’s largest neighborhood — followed by student-saturated Allston/Brighton, Jamaica Plain and restaurant-heavy Back Bay.

One newer hot spot is Public Alley 809 off Symphony Road in the Fenway neighborhood.

Neighbors said the rat problem is so bad that they can’t park their cars in the spots they own.

But inspectors said getting rid of rats is an uphill battle.

Commissioner Christopher pointed to all of the pizza boxes and trash left in flimsy plastic garbage bags on the ground.

“This is all homes for them,” he said. “We have tried over and over to explain to people to make sure all their food, all their waste is put into the proper containers, that they have the proper tops on, and they’ve got to maintain them.”

The city fights landlords that don’t plug holes in foundations or properly seal the bottoms of doors.

“A rat can get through a hole the size of a quarter,” McNally said. “Once they get inside, it can be a nightmare.”

Many landlords or residents don’t have enough trash barrels or at least not enough that are rodent-proof.

“Those are all gnaw marks. That’s rats — chewin’,” said McNally as he showed the NBC Boston Investigators a potato-sized hole in a recycling barrel that had been bitten through by rats. “They can eat through soft metals. It’s unreal what they can do. Great climbers, great swimmers.”

The city slaps the owner of one Gainsborough Street building that backs up into Public Alley 809 with violations nearly twice a month — thousands in fines.

“A lot of people see that as the cost of doing business,” Christopher said.

We went to see the building manager, Mohsen Minaie. He said he just brought in exterminators, but he can’t stop the tide of trash that people leave in the alley.

“I’ve been witnessing it myself,” Minaie said. “That other people throw out their trash there.”

Since 2008, his company has received 73 trash or rodent violations.

“Not my fault at all,” he said.

As the city expands — more people equals more food equals more rats.

Business has never better for private exterminators like Ultra Safe Pest Management. Exterminator Vic Palermo showed us what they’re up against as he worked on a building in Southie recently.

“Right down here we have an active entry point into the building. Some concrete has broken away," he said. "The rats are able to take advantage. They excavate or burrow right down inside, meaning into the building.”

He and his crew bait traps and stuff holes with rat-resistant mesh.

“This is stainless steel. It’s not going to corrode. It’s going to last a long time. Rats are not going to be able to chew through it.”

They then seal it with concrete and set bait traps to lure them away from the building.

“We rotate from snap traps and baits to certain areas," exterminator Jeff Kilian of Ultra Safe Pest Management said. "We figure snap traps have been working in this area as opposed to bait. So basically what I’m doing is I’m replacing the bait to keep a fresh supply on the snap traps, because after a couple days in this weather it’ll go bad and we want to make sure there’s fresh bait.”

The crew also advises building management on simple solutions to reduce the rat population, like moving the buffet — the dumpsters — away from the building.

“They wouldn’t feel safe crossing the parking lot getting to the dumpsters and getting back," Palermo said.

The city said it doesn't see the problem going away anytime soon.

“I don’t see us getting rid of rats ever,” said Christopher. “It’s too big a population.”

The city has had some success killing rats with dry ice — frozen carbon dioxide. It doesn’t leave a mess, won’t be accidentally eaten by other animals and is environmentally friendly. The EPA had ordered them to stop using it because it isn’t a registered pesticide, but the city said the agency is now showing signs of easing up on that restriction.