Univention Bugzilla – Bug 51729
UMC-Web-Server is limited to 1024 file descriptors
Last modified: 2020-08-05 15:15:30 CEST
The UMC web server is started with a ulimit of 1024 file descriptors. In large environments with many open sessions through UMC/Univention Portal, this means that no more sessions can be opened. In the test the limit for the process was raised to 65535 and it was no problem to open 2000 parallel SAML sessions at a rate of 1-2 SAML logins per second. We should raise the limit and make it configurable via a UCR variable.
1024 is the soft limit, 4096 the hard limit. With 2000 sessions there were around 4400 open file descriptors. So maybe we should also raise the hard limit.
Workraround: increase allowed number of open files for all mkdir /etc/systemd/system.conf.d/ In: "/etc/systemd/system.conf.d/limits.conf" ``` [Manager] DefaultLimitNOFILE=65535 ``` Dienste neustarten: ``` systemctl daemon-reexec systemctl restart univention-management-console-web-server.service systemctl restart univention-management-console-server.service ```
We already documented how to set the ulimt for open files per process in our perforemance documentation?!: https://docs.software-univention.de/performance-guide-4.4.html#kernel
Type in original bug title and bug description: The file descriptor limit for the UMC server, not the web server, should be raised
(In reply to Erik Damrose from comment #5) > Type in original bug title and bug description: The file descriptor limit > for the UMC server, not the web server, should be raised My bad, web server was right. The umc server already has the limit increased. @Assignee Please see "management/univention-management-console/scripts/univention-management-console-server":208 `resource.setrlimit(resource.RLIMIT_NOFILE, (64512, 64512))` and implement something similar in "management/univention-management-console/univention-management-console-web-server"
Created attachment 10446 [details] patch (git:fbest/51729-webserver-open-file-limits)
6b6584877c Bug #51729: Restart umc-web-server after test 182bde1a5a Bug #51729: Adjust test description 466e7c1fa2 Bug #51729: Add UCR Variable to set the limit of file descriptors in UMC-Web-Server b1d4bb0a0f Bug #51279: yaml ------------------------------------------ Successful build Package: univention-management-console Version: 11.0.4-99A~4.4.0.202008032042 Branch: ucs_4.4-0 Scope: errata4.4-5 ------------------------------------------ I raised the default file_descriptor limit in the umc-web-server to 65535 and added a test case. TODO: Documentation
I renamed the ucr variable, since Florian had a better suggestion 48b5d4c815 Bug #51729: rename UCR variable per florians request Successful build Package: univention-management-console Version: 11.0.4-101A~4.4.0.202008041231 Branch: ucs_4.4-0 Scope: errata4.4-5
902c2c40e8 Bug #51729: Add documentation
FAILED - yaml (version and umc/max/file_descriptors -> umc/http/max-open-file-descriptors) FAILED - ucs-test http://jenkins.knut.univention.de:8080/job/UCS-4.4/job/UCS-4.4-5/job/AutotestUpgrade/SambaVersion=s4,Systemrolle=master-part-II/lastCompletedBuild/testReport/86_selenium/13_umc_max_fd/ OK - UCRV desc OK - max open files after update -> cat /proc/$(pidof -x /usr/sbin/univention-management-console-web-server)/limits Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 11867 11867 processes Max open files 65535 65535 files OK - changing UCRV -> ucr set umc/http/max-open-file-descriptors='1024' -> service univention-management-console-web-server restart -> cat /proc/$(pidof -x /usr/sbin/univention-management-console-web-server)/limits Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 11867 11867 processes Max open files 1024 1024 files OK - documentation
7d8b21c618 Bug #51729: Print exception, stabilize 17c4b781a1 Bug #51729: yaml update The test did not fail again.
OK - yaml OK - test
<https://errata.software-univention.de/#/?erratum=4.4x701>