Hacker News new | ask | show | jobs
by andrew_eu 1054 days ago
> I once worked with a service in Python that forked worker processes to handle requests, ensuring that all cores could be used.

> > Unfortunately these workers ran out of memory quickly so we decided to have workers terminate themselves after a configurable number of requests had been handled so that Linux would do our memory management for us.

I once worked with a service in Python that was essentially an image server for a special biomedical image format. The decoder was a proprietary C library written by a vendor and, unsurprisingly, had tons of memory leak issues. This exact feature of Gunicorn [0] saved us months of going back and forth with the vendor to get the library to stop killing our servers.

Python has it's flaws, but so does anything touched by humans.

[0] https://docs.gunicorn.org/en/stable/settings.html#max-reques...