Bug 525637 - cups allows far too few connections
Summary: cups allows far too few connections
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cups
Version: 5.4
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: BaseOS QE
Depends On:
TreeView+ depends on / blocked
Reported: 2009-09-25 07:45 UTC by Bjørn Tore Sund
Modified: 2010-11-09 13:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-11-16 23:34:16 UTC

Attachments (Terms of Use)

Description Bjørn Tore Sund 2009-09-25 07:45:55 UTC
Description of problem:

We have a server running RHEL 5.4 x86_64 which functions as a CUPS server for ca 600 linux clients.  MaxClients is set to 10000 in cupsd.conf but it starts to log "Max clients reached, holding new connections..." when netstat shows between 400 and 450 simultaneous connections.  That will happen either when MaxClients is reached or when the system reaches max number of open file descriptors.  We have the following:
[root@linprint cups]# cat /proc/sys/fs/file-max
[root@linprint cups]# cat /proc/sys/fs/file-nr
2550    0       767350
[root@linprint cups]# lsof | wc -l

Version-Release number of selected component (if applicable):
[root@linprint cups]# rpm -q cups

How reproducible:
Happens all the time

Steps to Reproduce:
1. Set BrowsePoll to your cups server in your 500 clients
2. Restart cups on same clients

Actual results:

It starts rejecting clients at around 400-450 connections

Expected results:

It should start rejecting clients at around 10000 connections

Additional info:

Comment 1 Bjørn Tore Sund 2009-09-25 08:14:15 UTC
The actual number at the time it starts rejecting seems to be more in the area of 300-350 clients, anything above that show up in netstat but the cups server rejects them.

Comment 3 Tim Waugh 2009-11-16 16:15:29 UTC
The CUPS scheduler limits the number of clients to 1/3 of the maximum number of file descriptors as determined by 'getrlimit', if that is smaller than the number specified by MaxClients in the configuration file.  The default RLIMIT_NOFILE limit is 1024, one third of which is 341.

Please verify whether this is the cause of the problem by restarting the CUPS service after increasing that limit:

ulimit -n 2048
service cups restart

Comment 4 Bjørn Tore Sund 2009-11-16 20:27:50 UTC
That was indeed the problem, thank you very much.  Feel to free to close the bug as "user ignorance". :)


Comment 5 Tim Waugh 2009-11-16 23:34:16 UTC
No problem.  The /var/log/cups/error_log will have probably contained a message about it.

Note You need to log in before you can comment on or make changes to this bug.