Univention Bugzilla – Bug 45309
Too many open files in UMC
Last modified: 2017-10-10 15:38:47 CEST
We received the following UMC abort from a customer environment: 08.07.17 15:36:27.299 MAIN ( ERROR ) : Error during handling a request: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/server.py", line 155, in _receive self._handle(state, msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/server.py", line 204, in _handle Server.reload() File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/server.py", line 457, in reload moduleManager.load() File "/usr/lib/pymodules/python2.7/univention/management/console/module.py", line 391, in load OSError: [Errno 24] Too many open files: '/usr/share/univention-management-console/modules
After some more debugging, we found that the soft limit for open file descriptors was reached: PID [PROCESS] limit Hard limit Open files [...] 689 [/usr/bin/python2.7/usr/sbin/univention-management-console-serverrestart] 4096 64512 4297 The soft limit is set directly in UMC so that the limits settings are ignored (/etc/security/limits.conf).
Created attachment 9161 [details] check-max-open-files.sh Simple script to check the max open file settings.
Created attachment 9162 [details] umc_soft_limits.patch Patch to increase the soft limit: patch -p0 -d / <umc_soft_limits.patch /etc/init.d/univention-management-console-server restart
We introduced this code in Bug #39909. UMC never took any limits from /etc/security/limits.conf. The default value of UCS is: * soft nofile 32768 * hard nofile 32768 but somehow these limits aren't evaluated by python(?) processes. I get the following limits if I remove the code: Max open files 1024 4096 files So I will take Stefans patch.
univention-management-console (9.0.80-71): 836f0ab374b7 | Merge branch 'fbest/45309-umc-soft-limits' into 4.2-2 399cddd08e52 | Bug #45309: raise soft limit for max open files of the UMC server univention-management-console.yaml: baa9d275dc8a | YAML Bug #45309
OK, works. UMC Server is able to hold the desired amount of file descriptors as of 9.0.80-71: 27299 [/usr/bin/python2.7/usr/sbin/univention-management-console-serverstart] 64512 64512 64690 VERIFIED
<http://errata.software-univention.de/ucs/4.2/196.html>