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
Happens all the time
Steps to Reproduce:
1. Set BrowsePoll to your cups server in your 500 clients
2. Restart cups on same clients
It starts rejecting clients at around 400-450 connections
It should start rejecting clients at around 10000 connections
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.
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
That was indeed the problem, thank you very much. Feel to free to close the bug as "user ignorance". :)
No problem. The /var/log/cups/error_log will have probably contained a message about it.