Port Exhaustion - SQL
Reinis Rozitis
r at roze.lv
Thu May 16 13:09:25 UTC 2019
> We have made all the changed we could in the kernel to help with this but still hitting limits.
What changes have you made?
Usually the port limit is reached because of time wait sockets.
If not done already try with:
net.ipv4.ip_local_port_range = 1028 65535
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 30
Increasing the ephemeral port range (usually by default it starts around 30k so you effectively lose 30k ports - obviously adjust the lower limit to your application needs).
Then time wait socket reuse helps a lot and also decreasing the FIN timeout (the default is something like 60 seconds).
rr
More information about the nginx
mailing list