Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't limit the backlog for listen(2) #6881

Closed
wants to merge 1 commit into from
Closed

Conversation

Al2Klimov
Copy link
Member

No description provided.

@dnsmichi
Copy link
Contributor

dnsmichi commented Feb 4, 2019

I'm not sure if this will help with the current problems in slowly processing the requests. This will increase the backlog and likely harm the possibility to just retry the request by the client when it gets 'connection refused' instead.

https://serverfault.com/questions/518862/will-increasing-net-core-somaxconn-make-a-difference

Some administrators use high net.core.somaxconn to hide problems with their services, so from user's point of view process it'll look like a latency spike instead of connection interrupted/timeout (controlled by net.ipv4.tcp_abort_on_overflow in Linux).

listen(2) manual says - net.core.somaxconn acts only upper boundary for an application which is free to choose something smaller (usually set in app's config). Though some apps just use listen(fd, -1) which means set backlog to the max value allowed by system.

Real cause is either slow processing rate (e.g. a single threaded blocking server) or insufficient number of worker threads/processes (e.g. multi- process/threaded blocking software like apache/tomcat)

@lippserd I'd leave this "as is".

@Al2Klimov
Copy link
Member Author

It's unlikely to help with the current problems, but IMO the admins shall be able to decide by themselves what's good for them.

@Al2Klimov Al2Klimov removed the request for review from dnsmichi March 15, 2019 12:07
@Al2Klimov
Copy link
Member Author

Substituted by #7005.

@Al2Klimov Al2Klimov closed this Mar 15, 2019
@Al2Klimov Al2Klimov deleted the bugfix/listen-backlog branch March 15, 2019 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants