The seven steel boilers should have been replaced years ago.

Instead, they continue to sputter inside a cavernous brick building, producing steam that travels through a maze of old pipes providing heat and hot water to the Breukelen Houses in Canarsie, Brooklyn, a public housing complex where 3,500 people live.

On a recent morning, a masked welder squeezed into the dark chamber of boiler No. 7. One of its metal plates had corroded, and the boiler, built in 1985, needed to be patched up with a new one. Nearby stood a new 15-foot-long steel tank that collects water for the boilers to heat back to steam; it was free of punctures or leaks.

“The old one was completely rotting,” said Anthony Picciano, a superintendent who oversees heating plants in Brooklyn developments run by the New York City Housing Authority, or NYCHA.

As winter approaches, the city is racing to ready boilers in the nation’s largest public housing system, where widespread heat outages have repeatedly left many of its 400,000 low-income residents shivering in their homes. Many of the boilers are old; some were built in the 1950s. With temperatures dropping, the fragile, antiquated heating network imperils a large portion of public housing residents: children, older residents and people with health conditions.