![]() The trade-off here is that a connecting client will see a slow connection,īut this is almost certainly better than a Connection Refused error. # The maximum number of "backlogged sockets". # Increase the number of outstanding syn requests allowed. # 16MB per socket - which sounds like a lot, but will virtually never The kernel will keep pendingĬonnections in a buffer before failing. # only when it is safe from the network stack’s perspective.įinally one problem you'll find is that if a socket is listening andīusy a connection-backlog will pile up. ![]() # Allow reuse of sockets in TIME_WAIT state for new connections # (Use with caution according to the kernel documentation!) # Enables fast recycling of TIME_WAIT sockets. You can also increase the recycling time of sockets, avoiding large numbers of them staying in the TIME_WAIT status by adding these values to /etc/nf: To increase that range you append the following to the bottom of /etc/nf: With a large number of clients comnunicating with your server it wouldn't be unusual to have a 20,000 open sockets or more. Then run the following command to make your change take effect:įor servers which are handling large numbers of concurent sessions, there are some TCP options that should probabaly be tweaked. If you wish that change to be made persistently you should append to the file /etc/nf the line: ![]() The limit can be raised interactively by running, as root: You can view the current limit on the number of open-files by running: The kernel has built-in limits on the number of files that a process can open, and raising these limits, at a cost of some system memory, is usually a sane thing to attempt. When you're serving a lot of traffic it is usually the case that the traffic you're serving is coming from a large number of local files. It is designed to peform well on a wide range of hardware. Linux is the world-leading open-source kernel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |