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

Documentation of ListenBackLog in cupsd.conf doesn't seem accurate #5975

Closed
ioMatrix opened this issue Oct 1, 2021 · 2 comments
Closed

Documentation of ListenBackLog in cupsd.conf doesn't seem accurate #5975

ioMatrix opened this issue Oct 1, 2021 · 2 comments

Comments

@ioMatrix
Copy link

ioMatrix commented Oct 1, 2021

There is an issue with the documentation for the CUPS configuration. Notably ListenBackLog.

ListenBackLog number
Specifies the number of pending connections that will be allowed. This normally only affects very busy servers that have reached the MaxClients limit but can also be triggered by large numbers of simultaneous connections. When the limit is reached, the operating system will refuse additional connections until the scheduler can accept the pending ones. The default is the OS-defined default limit, typically either "5" for older operating systems or "128" for newer operating systems.

This sounds all good until you see the following tracing of the listen call of the TCP ports during application start...

[pid 35897] 23:55:25.419790 bind(6<TCP:[803311]>, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 <0.000023>
[pid 35897] 23:55:25.420073 listen(6<TCP:[803311]>, 5 <------- This) = 0 <0.000021>

Going into the application source code, it's obvious that the listen buffer is hard coded to 5 in versions of CUPS pre 2.3.5:

Line 248 of /cups/http-addr.c ----> listen(fd, 5)

So, the version of CUPS we are using is setting a backlog of 5 as you can see here:

# ss -ntlp
State      Recv-Q     Send-Q         Local Address:Port         Peer Address:Port    Process
LISTEN     0          5   <--HERE    0.0.0.0:631               0.0.0.0:*        users:(("cupsd",pid=35974,fd=7))

Version 2.3.5 release notes say the listen buffer (Send-Q) is now hard coded 128. Although an improvement, this is still a discrepancy from the documented ListenBackLog variable which says the default is the OS-defined limit.

Can someone correct me if I am out to lunch here?

@michaelrsweet
Copy link
Collaborator

@ioMatrix You are correct that ListenBacklog no longer does anything, and in fact it hasn't done anything since at least CUPS 1.7 (a little over 8 years ago).

I'll update the documentation to list it as no longer supported and we'll pull it completely from 2.4.0 over in OpenPrinting CUPS.

@michaelrsweet
Copy link
Collaborator

Apple CUPS:
[master b0014e4f5] Move ListenBackLog to the list of deprecated directives (Issue #5975)

OpenPrinting CUPS:
[master 620e9b1b7] Remove non-functional ListenBackLog directive (Apple #5975)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants