How to permanently set `net.core.somaxconn` in Debian?

You can do it via /etc/sysctl.conf.
Reboot to aply the changes.

Add net.core.somaxconn=1024 to /etc/sysctl.conf for it to become permanent (be reapplied after booting).

serverfault.com/a/271386

See also: