rawhat / glisten

A pure gleam TCP library
Apache License 2.0
55 stars 8 forks source link

Don't set `linger` by default and maybe allow it as an option? #14

Closed rawhat closed 6 months ago

rawhat commented 6 months ago

https://elixirforum.com/t/how-to-troubleshoot-increased-memory-usage-in-bandit/61825/17

This thread documents some issues that arose from the Phoenix Bandit swap. The biggest problem seemed to be the default linger setting causes sockets to remain open for too long, raising memory usage.

https://stackoverflow.com/questions/71975992/what-really-is-the-linger-time-that-can-be-set-with-so-linger-on-sockets/71975993#71975993

I'll need to do some more reading, but maybe it's worth just removing this for now and adding the ability to enable it.