What is the meaning of [A creaking gate hangs long]

Persons in weak health often live a long time. This is mostly used for very
sick people that are expected to die very soon, but they go on to live with
their sickness for a long time.

> — I’m worried that my grandfather may not live much longer. He’s been sick
for so many years.

> — Well, if it’s any comfort, I’ve heard that a creaking door hangs long.